This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AspNet Core 2.0 Add Migration Error

I want the migrate to create the database along with tables dynamically. AspNet Core 2.0 Add migration doesn't work.

<var
datastore = _MainDBContext.datastores.FirstOrDefault(x=>x.db_type=="MS"); string connectionString = @"Server=" + datastore.db_instance_ip + ";Port=3306;Database=" + datastore.db_name + ";Uid=" + datastore.db_user + ";Password=" + datastore.db_pass + ";"; optionsBuilder.UseMySQL(connectionString); _MSDBContext= new MSDBContext(optionsBuilder.Options); _MSDBContext.Database.Migrate();/>

Thank you in advance.