Share via


EF POCO Adapter updated (v1.02)

I've just posted updates to EF POCO Adapter (v1.02) which resolves a couple of issues spotted by users:

  1. Detached proxies (created by EFPocoContxt.CreateObject<T>) as well as proxies in the Added state were failing on property navigation. This has been fixed, and the property navigation doesn't attempt the load in one of these states. Thanks to Corey Gaudin for reporting this.
  2. GetAdapterObject() was failing for proxies created with CreateObject<T>. This has been fixed by ensuring that adapters are always cached whenever proxies are present. As a side effect of this change, DetectChanges() should be a bit faster, as we don't have to walk object state manager anymore. Thanks to Corey Gaudin for reporting this.
  3. Fixed code generator to eliminate compilation warning of unused property.

The updated version is available here.

Comments

  • Anonymous
    September 13, 2008
    PingBack from http://www.easycoded.com/ef-poco-adapter-updated-v102/

  • Anonymous
    September 19, 2008
    I am leaving these comments in hope that someone from the EDM team can help me out. I have been playing around and thorouly enjoying the EF POCO Adapter project and have implemented in a prototype quite successfully and it works wonderfully. The only issue I am having lately is Referential Integrity on the CSDL. I am using the EDM (entity data model) designer to make changes and build out my CSDL and SSDL and my POCO objects to represent my Domain Model and how it relates to my Datastore. However, when building out the Adapter and Proxies from EFPOCOAdapter it will no generate the Referential Constraints on the Object Context. So when I delete an object that should cascade down the delete, it doesnt. Upon researching this, I have found that the CSDL does not contain the Referential Integrity data in the CSDL (conceptual), it is in the SSDL (schema) which makes sense, however in order to get the EFPocoAdapter to generate my ObjectContext to handle cascade deleting, it needs the Referential Integrity tags in teh CSDL, which isnt added by the EDM Designer. Is there any way to force the EDM Designer to add this to the CSDL? I would like to use the Designer to build out my EDMX and pointing the Poco Adapter to that. So when I need to mask changes to my datastore and setup my model differently, it will save me time through the designer, and I can manage my POCO Entities by hand. Any ideas? Corey