Print Page | Close Window

Generating DbContext for Breeze from existing EDMX

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3895
Printed Date: 15-Oct-2025 at 11:23am


Topic: Generating DbContext for Breeze from existing EDMX
Posted By: willtcarey
Subject: Generating DbContext for Breeze from existing EDMX
Date Posted: 16-Jan-2013 at 7:06am
Hi there, we have a EDMX file that represents our database, and when using the code generation tools we get an EntityManager from that. However Breeze is looking for a DbContext to create an EFContextProvider. I've been looking around and it seems that DevForce claims to generate a DbContext at runtime, is there any way I can reference that to use in Breeze or am I stuck creating a custom DbContext?

Any help would be appreciated. Thanks



Replies:
Posted By: kimj
Date Posted: 16-Jan-2013 at 8:18am
Breeze doesn't currently integrate with DevForce.  There's currently a feature request to add this, which you can vote on here - http://breezejs.uservoice.com/forums/173093-breeze-feature-suggestions/suggestions/3387673-support-devforce-models - http://breezejs.uservoice.com/forums/173093-breeze-feature-suggestions/suggestions/3387673-support-devforce-models -.
 
You can use Breeze with your existing EDMX and standard EF, though.  Here's more info - http://www.breezejs.com/documentation/hosting-aspnet - http://www.breezejs.com/documentation/hosting-aspnet .
 


Posted By: willtcarey
Date Posted: 16-Jan-2013 at 8:25am
Ok, we have a plan to gradually phase out DevForce and gradually put in Breeze in it's place. You're telling me there is no way to run DevForce and Breeze concurrently? I've seen talk about writing a custom DbContext, would that help me at all?


Posted By: kimj
Date Posted: 16-Jan-2013 at 8:33am
You can certainly run Breeze and DevForce concurrently.   Breeze won't currently recognize your DevForce model and DevForce server-side code, so if you'd like to see that functionality please vote on it at the UserVoice link above. 
 
The Breeze support forum, which is quite active and should be able to better answer your questions, is here - http://stackoverflow.com/questions/tagged/breeze?sort=newest - http://stackoverflow.com/questions/tagged/breeze?sort=newest .


Posted By: willtcarey
Date Posted: 16-Jan-2013 at 11:09am
Ah ok, I see what you mean. We wound up going with a separate project to which generated entity framework models for us. Thanks for your help!



Print Page | Close Window