Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Framework entity
Hi guys,
 
I'm here for a bit of advice really as I have seen quite alot of contradictory articles/advice, including stuff from Microsoft.
 
In your opinion(s) what is the best way to use the entity framework when creating forms (either WPF/Winform) that are used for both data entry and data viewing.
 
Should you:
 
a) create an entity context instance at the start of the program and maintain it throughout the application?
b) Only create the instance as and when you need to read data, save data etc?
 
Which do you feel works best when you want to implement lazy loading and change tracking?
 
I have googled this, and read a variety of articles and none are definitive so I am after some more opinions so that I can make my own judgement at the end.
 
Thanks.
Posted 26-Mar-13 1:31am
Pheonyx11.8K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

One can not simply advice on this matter. I agree you get a lot of unwanted and confusing information over the net. The best thing you can do is read this book - "Programming Entity Framework IInd Edition by Julia Lerman". The rest depends on you. :-)
 
Note:This book is very good & very helpful. If you are going to use EF, then you have no other choice.
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 505
1 Maciej Los 325
2 Richard MacCutchan 265
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 3 Apr 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100