I have a class library, DML, that models a database I’m trying to create using EntityFramework and Sql Server. The DbContext class constructor is shown below

public void RSOWebContext() : base(“RSOWebConnection”)
{}

The app.config file has a connection string named “RSOWebConnection” and no other connection strings, including a localdb string. Nothing. However, when I execute enable-migration, add-migration, then update-database, the database is created in localdb using RSOWebContext. Obviously, it’s using the default method of localdb named after the context class name but cannot figure out why. Any hints? I’m using entityframework 6.

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *