// using ClientDataBaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace ClientDataBaseImplement.Migrations { [DbContext(typeof(ClientsDatabase))] partial class ClientsDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.20") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("ClientDataBaseImplement.Models.Category", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Categories"); }); modelBuilder.Entity("ClientDataBaseImplement.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CategoryId") .HasColumnType("int"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Fio") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Photo") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.ToTable("Clients"); }); modelBuilder.Entity("ClientDataBaseImplement.Models.Client", b => { b.HasOne("ClientDataBaseImplement.Models.Category", "Category") .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Category"); }); #pragma warning restore 612, 618 } } }