Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- _cmsDBContext = new CmsDBContext(optionsBuilder.Options);
- _cmsDBContext.Database.Migrate();
Add Comment
Please, Sign In to add comment