New Posts New Posts RSS Feed: Instantianting the entity model
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Instantianting the entity model

 Post Reply Post Reply
Author
BillG View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 05-Dec-2007
Location: Monroe, MI
Posts: 233
Post Options Post Options   Quote BillG Quote  Post ReplyReply Direct Link To This Post Topic: Instantianting the entity model
    Posted: 16-Sep-2010 at 9:57am
In your samples for Silverlight, you show in the ViewModel class that you do the following
 
mgr = new NorthWindEntities();
 
I don't really want to do that in everyone of my ViewModel classes do I? Won't that hurt performance? Should I create a singleton class for this purpose or does it matter?
 
Bill
 
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 16-Sep-2010 at 11:47am
You probably don't want to create multiple EntityManagers in your application.  You probably want just one.  You could create a singleton class to do this.  If you do want to use multiple EntityManagers, consult the DevForce Resource Center.

http://drc.ideablade.com/xwiki/bin/view/Documentation/EntityCaching


Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down