|
-
Sep 26th, 2009, 01:27 AM
#3
Re: .Net Entity Framework
It's not necessarily a great idea to have a single static instance like that. It will end up growing with each data access and keeping data around that you don't need any more. You should actually create a new instance for each chunk of data access you want to perform.
I've only used the EF in ASP.NET MVC apps and I followed the suggested path of creating a repository class that creates an instance of the entities collective. If I was going to use it in a Windows app I'd follow a similar pattern and all the data access would take place in that repository, facilitating use in any n-tier system.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|