Re: LINQ for SQL Conflict Resolution
Helen Warn <[email protected]> Mon, 6 Apr 2009 08:23:35 -0700
| Newsgroups | gmane.comp.windows.devel.dotnet.advanced |
|---|---|
| Message-ID | <[email protected]> |
Hi Frans, Actually there are templates for Linq 2 SQL -- see Damien Guard's blog: http://damieng.com/blog/2009/01/19/linq-to-sql-templates-updated-now-on-code plex FWIW the classes generated do not compile on Silverlight either. Cheers, Helen -----Original Message----- From: Discussion of advanced .NET topics. [mailto:[email protected]] On Behalf Of Frans Bouma Sent: Monday, April 06, 2009 8:07 AM To: [email protected] Subject: Re: [ADVANCED-DOTNET] LINQ for SQL Conflict Resolution I wonder why topic started hasn't consider an AFTER DELETE trigger instead for deletes? the code would become much simpler and still the deleted data is available for auditing purposes (in the trigger, similar to what it is now). Of course I'm not aware of what the auditing stuff contains so it might be more complex than that. > Yeah, not fun. If it's any help, you don't have to do it for all the CUD > operations, just the Delete, and let the runtime take care of the rest. > > I'm using LINQ to SQL in a Silverlight project, and I find myself basically > maintaining my client objects without it, only using LINQ 2 SQL in the WCF > Services to get the data. I also removed a lot of the FKs from the data > model because I was maintaining the client objects in my Silverlight app, > and with all the FKs the client objects became too bulky. I can get away > with this because the client classes are not very complex. A lot of the > classes generated by SQLMetal do not compile in Silverlight -- and on it > goes. Sigh. I briefly considered switching to the Entity Framework, but > decided to stick with LINQ 2 SQL because it has a smaller footprint on the > client side. I will probably reconsider down the road. As silverlight is so stripped down, I don't think EF classes compile on silverlight either, you need DTO's and thus have to babysit the changes made and play them back on the server. You could perhaps use some mechanism inside the DTO which tracks changes and which would make it easier to update the real entity on the server, but that would require a different code generator (as sqlmetal doesn't use templates). FB =================================== View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives