Thanks for the update.
I am still getting up to speed with Linq. I am looking at both linq to sql (old I know) and linq to EF. Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 6396 4285 (Monday, Wednesday,Friday) Phone : +618 9346 4372 (Tuesday, Thursday) Mobile: 0423 540 825 E-Mail : [email protected]; [email protected] The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately. From: [email protected] [mailto:[email protected]] On Behalf Of Greg Keogh Sent: Monday, 19 March 2012 12:52 PM To: 'ozDotNet' Subject: RE: Learning LINQ I noticed that I can add the items . ADO.NET Entity Data Model . ADO.NET Entity Object Generator and . ADO.NET Self-Tracking Entity Generator I haven't used the Object Generator, but plenty of the other two. The Entity Data Model is the simplest case where you get an EDMX file and it generates classes for entities and the context (connection). The entities are tracked by the context and you should keep the context alive while doing CRUD on the entities it's tracking. The entities and the context are sort of "glued together". I find this technique only useful for the most simplistic scenarios as it hinders attempts to send entities over n-tier and back again. The Self Tracking creates smart POCO classes that are easier to send over n-tier and back into a fresh context for updating. A little bit more care is required, but the STE templates was released or this purpose. In fact, netTiers generates similar classes by default. Create an EDMX and turn off code generation, then edit the two tt files and point them to the EDMX file. Cheers, Greg
