Last post May 30, 2012 10:06 AM by hoopslife
May 30, 2012 10:02 AM|kayson|LINK
I'm experienced in C# and ASP.NET webforms, but new to the MVC and Entity Models. I'd like to ask what is the best practice for sharing data between several ASP.NET applications.
I'm creating two websites, both using MVC, one front-end site and one back-end admin site. Since the two sites access the same database it makes sense to create a common .edmx shared between the two. I'd also like to have a configurable connection string
so I can easily switch between the test SQL databse and the actual SQL database.
The problem is all the tutorials I can find on the web deal with a single MVC application. Any ideas from experienced developers on how to approach this scenario?
May 30, 2012 10:06 AM|hoopslife|LINK
I would just create a seperate project that works as a business layer for both websites. This project can have your shared functionality so you don't have to duplicate any code. Just create the project and then point to the dll from the two websites.
You will be able to use the methods in that Business.dll.