By Rick Anderson
The ApplicationDbContext class handles the task of connecting to the database and mapping Movie objects to database records. The database context is registered with the Dependency Injection container in the ConfigureServices method in the Startup.cs file:
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
The ASP.NET Core Configuration system reads the ConnectionString.
http://codango.com/working-with-sql-server-localdb/
I am happy to share this resource that we found. The content displayed on this page is property of its original author or their organization.
No comments:
Post a Comment