User-309523270 posted
Hi,
I had to upgrade Oracle version from 12c to 19c. I am using ASP.Net Core 2.2.
I was able to retrieve my user-defined tables. However, I am unable to retrieve the Identity tables.
In this code, user returns null:
var user =
await _userManager.FindByNameAsync(model.Username.ToUpper());
My initial database used to create(using scaffolding) is not the same database name/server used in the new upgrade server.
public partial class ToolsDbContext : IdentityDbContext<AppUser>
{
public ToolsDbContext()
{
}
public ToolsDbContext(DbContextOptions<ToolsDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasAnnotation("ProductVersion", "2.2.6-servicing-10079")
.HasAnnotation("Relational:DefaultSchema", "TOOLS_TS");
base.OnModelCreating(modelBuilder);
}
I suppose I can add the Identity tables in ToolsDBContext but that seems to be the wrong approach. I thought the "base.OnModelCreating(modelBuilder); " will resolve it, but unfortunately, did not.
Please help!
Thanks,
tinac99