CSLA Connection Management and EF Code First

CSLA Connection Management and EF Code First

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


joemorin73 posted on Wednesday, June 27, 2012

I've been reading up on the connection management.  I may be missing something, but I am wondering if CSLA performs connection management with EF with Code First.  I have used ObjectContextManager with the EDMX style EF, but I don't believe it is compatible.

 

  (We're developing new, so we are using the latest EF (4.3) and CSLA (4.3.12) framework.)

JonnyBee replied on Wednesday, June 27, 2012

Hi,

The DbContextManager is checked in for Csla 4.5. You may add this to your own assembly. 

joemorin73 replied on Wednesday, June 27, 2012

Can I include the DbContextManager only and easily or should I consider using Csla 4.5.  I'm hesitant on using 4.5 as it is not a stable release.

JonnyBee replied on Wednesday, June 27, 2012

You can include the DbContextManager only (and maybe add some recources if new entries was added).

You must also add reference to EF 4.1 (or newer - where DbContext was intrduced).

joemorin73 replied on Wednesday, June 27, 2012

I've added only the DbContextManager and it appears to be compiling fine.  There doesn't appear to be any .Net 4.5 or Csla 4.5 calls in it.  I will update if there are any problems.

JonnyBee replied on Wednesday, June 27, 2012

Hi,

That is correct - the code is plain C# 4.0 and only requires reference to EntityFramework assembly.

Copyright (c) Marimer LLC