File: Data\Migrations\00000000000000_CreateIdentitySchema.Designer.cs
Web Access
Project: src\src\Identity\samples\IdentitySample.Mvc\IdentitySample.Mvc.csproj (IdentitySample.Mvc)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IdentitySample.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
 
namespace IdentitySample.Data.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    [Migration("00000000000000_CreateIdentitySchema")]
    partial class CreateIdentitySchema
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "1.0.0-rc3")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
                {
                    b.Property<string>("Id");
 
                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken();
 
                    b.Property<string>("Name")
                        .HasAnnotation("MaxLength", 256);
 
                    b.Property<string>("NormalizedName")
                        .HasAnnotation("MaxLength", 256);
 
                    b.HasKey("Id");
 
                    b.HasIndex("NormalizedName")
                        .HasDatabaseName("RoleNameIndex");
 
                    b.ToTable("AspNetRoles");
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();
 
                    b.Property<string>("ClaimType");
 
                    b.Property<string>("ClaimValue");
 
                    b.Property<string>("RoleId")
                        .IsRequired();
 
                    b.HasKey("Id");
 
                    b.HasIndex("RoleId");
 
                    b.ToTable("AspNetRoleClaims");
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();
 
                    b.Property<string>("ClaimType");
 
                    b.Property<string>("ClaimValue");
 
                    b.Property<string>("UserId")
                        .IsRequired();
 
                    b.HasKey("Id");
 
                    b.HasIndex("UserId");
 
                    b.ToTable("AspNetUserClaims");
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
                {
                    b.Property<string>("LoginProvider");
 
                    b.Property<string>("ProviderKey");
 
                    b.Property<string>("ProviderDisplayName");
 
                    b.Property<string>("UserId")
                        .IsRequired();
 
                    b.HasKey("LoginProvider", "ProviderKey");
 
                    b.HasIndex("UserId");
 
                    b.ToTable("AspNetUserLogins");
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<string>", b =>
                {
                    b.Property<string>("UserId");
 
                    b.Property<string>("RoleId");
 
                    b.HasKey("UserId", "RoleId");
 
                    b.HasIndex("RoleId");
 
                    b.HasIndex("UserId");
 
                    b.ToTable("AspNetUserRoles");
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken<string>", b =>
                {
                    b.Property<string>("UserId");
 
                    b.Property<string>("LoginProvider");
 
                    b.Property<string>("Name");
 
                    b.Property<string>("Value");
 
                    b.HasKey("UserId", "LoginProvider", "Name");
 
                    b.ToTable("AspNetUserTokens");
                });
 
            modelBuilder.Entity("WebApplication13.Models.ApplicationUser", b =>
                {
                    b.Property<string>("Id");
 
                    b.Property<int>("AccessFailedCount");
 
                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken();
 
                    b.Property<string>("Email")
                        .HasAnnotation("MaxLength", 256);
 
                    b.Property<bool>("EmailConfirmed");
 
                    b.Property<bool>("LockoutEnabled");
 
                    b.Property<DateTimeOffset?>("LockoutEnd");
 
                    b.Property<string>("NormalizedEmail")
                        .HasAnnotation("MaxLength", 256);
 
                    b.Property<string>("NormalizedUserName")
                        .HasAnnotation("MaxLength", 256);
 
                    b.Property<string>("PasswordHash");
 
                    b.Property<string>("PhoneNumber");
 
                    b.Property<bool>("PhoneNumberConfirmed");
 
                    b.Property<string>("SecurityStamp");
 
                    b.Property<bool>("TwoFactorEnabled");
 
                    b.Property<string>("UserName")
                        .HasAnnotation("MaxLength", 256);
 
                    b.HasKey("Id");
 
                    b.HasIndex("NormalizedEmail")
                        .HasDatabaseName("EmailIndex");
 
                    b.HasIndex("NormalizedUserName")
                        .IsUnique()
                        .HasDatabaseName("UserNameIndex");
 
                    b.ToTable("AspNetUsers");
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole")
                        .WithMany("Claims")
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<string>", b =>
                {
                    b.HasOne("WebApplication13.Models.ApplicationUser")
                        .WithMany("Claims")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
                {
                    b.HasOne("WebApplication13.Models.ApplicationUser")
                        .WithMany("Logins")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
 
            modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<string>", b =>
                {
                    b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole")
                        .WithMany("Users")
                        .HasForeignKey("RoleId")
                        .OnDelete(DeleteBehavior.Cascade);
 
                    b.HasOne("WebApplication13.Models.ApplicationUser")
                        .WithMany("Roles")
                        .HasForeignKey("UserId")
                        .OnDelete(DeleteBehavior.Cascade);
                });
#pragma warning restore 612, 618
        }
    }
}