I created a new MVC5 project with Identity and it makes its own db which i want to change with same one but mine and on cloud server. so i have 2 connection stings and the only things that i changed was table names ex: aspnetUser to CJUser and so on. I want some simple way of changing auto generated local db to my own cloud one.
2 connection strings i have are default one which Identity creates and my own db which i connected.
So project works with its own connection but when i change connections in Identity models to mine, it stops working.
public class ApplicationUser : IdentityUser
{
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
// Add custom user claims here
return userIdentity;
}
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("IdentityDbContext", throwIfV1Schema: false)
{
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
}