2

I divided a large scale app into many different Bounded Contexts and generated BC specific entities in seperate projects through T4. For example, ProjectA contain entities A,B,C and the ProjectB contain D,E,F. There is only edmx.

Is it better to use only one EF dbContext class for the persistance of the all different BC entities or use seperate dbContext for each BC? As I understand multiple dbContext classes mean the app has to keep multiple connections which may be good for performance, but I dont know it's impact on the server resources.

wonderful world
  • 10,969
  • 20
  • 97
  • 194
  • you plan to be using EF code first, and its DbContext - if I'm getting it right, to mimic Bounded Contexts. I just posted some info on multiple contexts [>here<](http://stackoverflow.com/a/15795166/417747) (skip the 'connection problem' part - go to 'Note') – NSGaga-mostly-inactive Apr 03 '13 at 19:42
  • I have taken the approach of one edmx, multiple design views. – wonderful world Apr 20 '13 at 12:24

0 Answers0