对于一个项目,我正在尝试使用身份作为身份验证服务。为此,我正在尝试将该实体映射到现有数据库。我认为这部分已经完成并且现在可以正常工作,但是当我尝试登录时,会抛出错误,并且我不知道如何解决。就是说seqOwner不能为null,我不明白为什么Oracle试图创建序列。这是我的IdentityModel.csprotected override void OnModelCreating(DbModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.HasDefaultSchema("SCHEMA1"); modelBuilder.Entity<ApplicationUser>().ToTable("SCHEMA1.PERSONNELS", "SCHEMA1$USER"); modelBuilder.Entity<ApplicationUser>().Property(p => p.UserName).HasColumnName("PE_USERNAME"); modelBuilder.Entity<ApplicationUser>().Property(p => p.PasswordHash).HasColumnName("PE_MDPEXTRA").IsOptional(); modelBuilder.Entity<ApplicationUser>().Property(p => p.Email).HasColumnName("PE_MAIL"); modelBuilder.Entity<ApplicationUser>().Property(p => p.Id).HasColumnName("PE_ID"); modelBuilder.Entity<ApplicationUser>().Ignore(c => c.AccessFailedCount) .Ignore(c => c.LockoutEnabled) .Ignore(c => c.LockoutEndDateUtc) .Ignore(c => c.EmailConfirmed) .Ignore(c => c.SecurityStamp) .Ignore(c => c.TwoFactorEnabled) .Ignore(c => c.PhoneNumberConfirmed) .Ignore(c => c.PhoneNumber); }这是连接字符串,可以正常工作,我可以看到表格和序列<add name="IdentityContext" connectionString="DATA SOURCE=gesmardev.world;PASSWORD=gesmar;PERSIST SECURITY INFO=True;USER ID="GESMAR$USER"" providerName="Oracle.ManagedDataAccess.Client" />
1 回答
- 1 回答
- 0 关注
- 169 浏览
添加回答
举报
0/150
提交
取消