コード例 #1
0
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.HasDefaultSchema("adminapp");

            modelBuilder.Entity <AdminAppUser>().ToTable("Users");
            modelBuilder.Entity <IdentityRole>().ToTable("Roles");
            modelBuilder.Entity <IdentityUserClaim>().ToTable("UserClaims");
            modelBuilder.Entity <IdentityUserLogin>().ToTable("UserLogins");
            modelBuilder.Entity <IdentityUserRole>().ToTable("UserRoles");
            modelBuilder.Entity <UserOdsInstanceRegistration>().HasKey(k => new { k.UserId, k.OdsInstanceRegistrationId }).ToTable("UserOdsInstanceRegistrations");

            modelBuilder.ApplyDatabaseServerSpecificConventions();
        }
コード例 #2
0
 protected override void OnModelCreating(DbModelBuilder modelBuilder)
 {
     base.OnModelCreating(modelBuilder);
     modelBuilder.HasDefaultSchema("adminapp");
     modelBuilder.ApplyDatabaseServerSpecificConventions();
 }