// using System; using LibraryDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace LibraryDatabaseImplement.Migrations { [DbContext(typeof(LibraryDatabase))] [Migration("20231116200005_InitialCreate")] partial class InitialCreate { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("LibraryDatabaseImplement.Models.Book", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Cost") .HasColumnType("int"); b.Property("CostStr") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Genre") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Books"); }); modelBuilder.Entity("LibraryDatabaseImplement.Models.Genre", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Genres"); }); #pragma warning restore 612, 618 } } }