// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using iPackage.Core.Web.Models.Entity; namespace NugetTest.AspCore.Migrations { [DbContext(typeof(ApplicationContext))] partial class ApplicationContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "5.0.0-preview.5.20278.2") .HasAnnotation("Relational:MaxIdentifierLength", 128) .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); modelBuilder.Entity("NugetTest.AspCore.Models.Article", b => { b.Property("ArticleId") .ValueGeneratedOnAdd() .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property("Content") .HasColumnType("nvarchar(max)"); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("IsRemoved") .HasColumnType("bit"); b.Property("PersonId") .HasColumnType("int"); b.Property("RemoveTime") .HasColumnType("datetime2"); b.HasKey("ArticleId"); b.HasIndex("PersonId"); b.ToTable("Articles"); }); modelBuilder.Entity("NugetTest.AspCore.Models.Person", b => { b.Property("PersonId") .ValueGeneratedOnAdd() .HasColumnType("int") .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); b.Property("CreationTime") .HasColumnType("datetime2"); b.Property("FamilyName") .HasColumnType("nvarchar(max)"); b.Property("FirstName") .HasColumnType("nvarchar(max)"); b.Property("IsRemoved") .HasColumnType("bit"); b.Property("PersonId1") .HasColumnType("int"); b.Property("RemoveTime") .HasColumnType("datetime2"); b.HasKey("PersonId"); b.HasIndex("PersonId1"); b.ToTable("People"); }); modelBuilder.Entity("NugetTest.AspCore.Models.Article", b => { b.HasOne("NugetTest.AspCore.Models.Person", "Person") .WithMany() .HasForeignKey("PersonId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); }); modelBuilder.Entity("NugetTest.AspCore.Models.Person", b => { b.HasOne("NugetTest.AspCore.Models.Person", null) .WithMany("Persons") .HasForeignKey("PersonId1"); }); #pragma warning restore 612, 618 } } }