tag:blogger.com,1999:blog-8602939654357884727.post5153074143298466782..comments2023-12-27T03:03:29.331-08:00Comments on TutorialGenius.com: Serializing LINQ-to-SQL classes example with deep clonings34nvideoshttp://www.blogger.com/profile/16947568863329729565noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8602939654357884727.post-61323038216232968642013-06-04T02:02:52.630-07:002013-06-04T02:02:52.630-07:00Thanks for this. It works great.
But to use it i...Thanks for this. It works great. <br />But to use it in an insert/update db record scenario it doesn't invoke the property changing events, so the db record doesn't get changed.<br /><br />How to get those property changing events fired up? Should I walk through all the members of the class (reflection?)and set them?<br /><br />Below code exmaple of a dbml generated property of a table field. As one can see the set-part of the property contains the changing events.<br /> [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="UniqueIdentifier NOT NULL", IsPrimaryKey=true)]<br /> [global::System.Runtime.Serialization.DataMemberAttribute(Order=1)]<br /> public System.Guid Id<br /> {<br /> get<br /> {<br /> return this._Id;<br /> }<br /> set<br /> {<br /> if ((this._Id != value))<br /> {<br /> this.OnIdChanging(value);<br /> this.SendPropertyChanging();<br /> this._Id = value;<br /> this.SendPropertyChanged("Id");<br /> this.OnIdChanged();<br /> }<br /> }<br /> }Don Ruiterhttps://www.blogger.com/profile/16204236165735422204noreply@blogger.com