Guest User

Untitled

a guest
Apr 25th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. var datastore = _MainDBContext.datastores.FirstOrDefault(x=>x.db_type=="MS");
  2. string connectionString = @"Server=" + datastore.db_instance_ip + ";Port=3306;Database=" + datastore.db_name + ";Uid=" + datastore.db_user + ";Password=" + datastore.db_pass + ";";
  3. optionsBuilder.UseMySQL(connectionString);
  4. _cmsDBContext = new CmsDBContext(optionsBuilder.Options);
  5. _cmsDBContext.Database.Migrate();
Add Comment
Please, Sign In to add comment