Removing work around applied
Bug https://github.com/aspnet/identity/issues/102 is fixed. Removing the work around applied for the same.
This commit is contained in:
parent
d112adc1f2
commit
2f88fb4d9d
|
|
@ -9,18 +9,9 @@ namespace MusicStore.Models
|
|||
|
||||
public class ApplicationDbContext : IdentitySqlContext<ApplicationUser>
|
||||
{
|
||||
private IdentityDbContextOptions options;
|
||||
|
||||
public ApplicationDbContext(IServiceProvider serviceProvider, IOptionsAccessor<IdentityDbContextOptions> optionsAccessor)
|
||||
: base(serviceProvider, optionsAccessor.Options)
|
||||
{
|
||||
options = optionsAccessor.Options;
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptions builder)
|
||||
{
|
||||
//Bug: Identity overriding the passed in connection string with a default value. https://github.com/aspnet/identity/issues/102
|
||||
builder.UseSqlServer(options.ConnectionString);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -29,8 +20,5 @@ namespace MusicStore.Models
|
|||
public string DefaultAdminUserName { get; set; }
|
||||
|
||||
public string DefaultAdminPassword { get; set; }
|
||||
|
||||
//Bug: Identity overriding the passed in connection string with a default value. https://github.com/aspnet/identity/issues/102
|
||||
public string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -38,9 +38,7 @@ namespace MusicStore
|
|||
{
|
||||
options.DefaultAdminUserName = configuration.Get("DefaultAdminUsername");
|
||||
options.DefaultAdminPassword = configuration.Get("DefaultAdminPassword");
|
||||
//Bug: Identity overriding the passed in connection string with a default value. https://github.com/aspnet/identity/issues/102
|
||||
options.ConnectionString = configuration.Get("Data:IdentityConnection:ConnectionString");
|
||||
options.UseSqlServer(options.ConnectionString);
|
||||
options.UseSqlServer(configuration.Get("Data:IdentityConnection:ConnectionString"));
|
||||
});
|
||||
|
||||
services.SetupOptions<MusicStoreDbContextOptions>(options =>
|
||||
|
|
|
|||
Loading…
Reference in New Issue