Skip to content

Configuring ASP.NET MVC → SQL Server

Aaron Hanusa edited this page Jan 24, 2016 · 4 revisions

ASP.NET MVC → SQL Server

MVC → SQL Server

Watch the configuration video here.

In this scenario, the ASP.NET MVC client consumes business services that are injected with data proxies that use Entity Framework 6.0 to communicate with a SQL Server database.

The MVC project uses dynamic dependency injection to create business services and data proxies that will be injected into the MVC controllers. To configure the MVC project to consume Entity Framework data proxies, open the DependencyInjection.config file.

Notice that there are three configuration sections for data proxies; Entity Framework, HTTP, and In-Memory, respectively. Simply ensure that the Entity Framework Data Proxies section is uncommented and the others are commented out.

Before running the application, be sure to setup SQL Server after changing the configuration.

To run the application, ensure that the MVC project is set as the startup project.