« Using the dynamic Keyword in C# to Improve Object-Orientation | Main | Split Button in WPF »

28/05/2010

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Mihai

Great post! What if you would like to know which properties have been set on the client? Something other that an auto-generated "Specified"-suffixed property...

Walter Almeida

Thanks Mihai for your comment,

Well, a full self-tracking service definition is already another subject. I will probably write a post on this subject later, so keep in touch!

In the meantime you can have a look at the self-tracking entities templates for Microsoft Entity Framework 4

Mihai

Thanks Walter, I'll keep in touch!

BTW, I'm already using an ORM (NHibernate) on the server-side. For the issue with the client-to-server communication and detecting which properties the client has set, maybe the DataContractSerializer can be extended? Although I now see that it is sealed... hmm.

Walter Almeida

Hello Mihai,

I think the best way to let your service server-side to know what has changed in your entities is to include this information in your datacontract, having as you said, for example, auto-generated "specified" suffix or more complex and complete information. We are talking about a service oriented scenario and information other than technical stuff (transactions, security etc.) should IMHO be contained in the message.

I would advise you to check this product : Llblgen Pro ( http://www.llblgen.com ). It is an excellent product which gives you designer, template writting and code generation support for several ORM products, including NHibernate. It could be that someone already wrote templates for self tracking entities for NHibernate. Ask their support team, they are very efficient, they will reply to you! ( http://www.llblgen.com/tinyforum/ )

Good luck in your work, I would appreciate if you let me know about your findings!

Mihai

Thanks, sounds like a neat tool! I've used MyGeneration so far (but no designer there last time I checked).

Larry Spencer

Thanks for taking the time to post this, Walter. You present a very intelligent and thorough case. Even though I do a lot with WCF and self-tracking entities, I have not seen your ideas elsewhere.

Walter Almeida

Thanks Larry, I appreciate your comment:) And I am glad my post was helpfull!

Bennett

I think if any person works to his/her optimum levels then no work is very tough to accomplish. 330)

Ryan O'Neill

You can also detect serialisation and prevent updates to your IsDirty flag that way. Seems smaller and tidier as it is self documenting and you don't need to worry about someone in future forgetting and putting DataContract on the public property by accident.

VB version:
Public Sub NotifyPropertyChanged(ByVal info As String)
If (Not isDeserializing) Then IsDirty = True
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
End Sub


Public Sub OnOnDeserializing(context As StreamingContext)
isDeserializing = True
End Sub


Public Sub OnDeserialized(context As StreamingContext)
isDeserializing = False
End Sub

ベルト レディース

ショップ素晴らしいヒーター;ある 多くの珍しいヒーターの設計 したがってサイズ。ギリシア人も で有能だった島をどのように彼らの家 営業キャビティ壁。ただし、最近そこいくつか スペシャ リスト メソッド方法の 人保つことができる を食品ホット。あなたも 消費電気 ベースボードヒーター。

女性 ブランド 財布

ブライダルの使用デザイナー財布意味、自尊心と態度の花嫁。、を参照してください、チェーンいっぱいですに加え魔法の機能を述べないためで無料味と精神。かどうかに関係なくいくつかの売り手を知っている人商品思われる利用できないためにチャンネルを承認します。これは主にで起こるインスタンスファッションのhobos。

エルメスベルトメンズ

逆 を人気の信念 氷口内炎は ないフォーム 一緒にヘルペス。右ここでので、フロリダ州砂漠私たち 収獲グリーン サラダ 任意年と はあまり好き。探す素晴らしいヒーター;ある 多くのユニークなヒーターの設計 とサイズ。ロッカーwindows は 用に設計された適しています が商業または アパートおよびコンドミニアム。 エルメスベルトメンズ

The comments to this entry are closed.

My Other Accounts

Links

Twitter Updates

    follow me on Twitter