I’m a newbie to C# ASP development but I’m using it to develop a web application using MVC3.
I have created an application which has common components and have broken down the services that the site provides into ‘areas’. I would like to keep each area seperate as far as possible and so have created a DbContext for the application and one for each area.
I’d like to use a database initializer to initialise each of the areas but I’m not sure how to approach this.
Is this the best architectural approach to take? If so, how do I create multiple area intializers for this configuration. If not, how would you approach this problem in C# MVC3?
Thanks in advance,
Niall
You can only set one DbContext for a application. You would only use diffent DbContext objects if you where to use multiple databases.