ContextManager for EntityFramework

ContextManager for EntityFramework

Old forum URL: forums.lhotka.net/forums/t/7245.aspx


nampord posted on Wednesday, July 08, 2009

Hi

I am curretnly trying to implement a DAL with the EntityFramework. In this context it would be handy to have a ContextManager similar to the one for Linq to SQL, but managing the EF context.

Does this exist already somewhere? If not any recommendations on how to best implement this? Would that be a feature of general interest?

Thanks for your feeedback

Frank

 

cberthold replied on Wednesday, July 08, 2009

it already exists and works quite well.

using (var ctx =
                ObjectContextManager<SpectrumEstimationEntities>.GetManager(Database.MyDatabase)) {

}


sergeyb replied on Wednesday, July 08, 2009

It does.  I think you need 3.6.2 or higher.  It is called ObjectContextManager

 

Sergey Barskiy

Principal Consultant

office: 678.405.0687 | mobile: 404.388.1899

cid:_2_0648EA840648E85C001BBCB886257279
Microsoft Worldwide Partner of the Year | Custom Development Solutions, Technical Innovation

 

From: nampord [mailto:cslanet@lhotka.net]
Sent: Wednesday, July 08, 2009 4:47 PM
To: Sergey Barskiy
Subject: [CSLA .NET] ContextManager for EntityFramework

 

Hi

I am curretnly trying to implement a DAL with the EntityFramework. In this context it would be handy to have a ContextManager similar to the one for Linq to SQL, but managing the EF context.

Does this exist already somewhere? If not any recommendations on how to best implement this? Would that be a feature of general interest?

Fhanks fro your feeedback

 



Copyright (c) Marimer LLC