226 lines
7.8 KiB
C#
226 lines
7.8 KiB
C#
// <auto-generated />
|
|
using HomeLibrary.Api.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace HomeLibrary.Api.Migrations
|
|
{
|
|
[DbContext(typeof(HomeLibraryDbContext))]
|
|
[Migration("20220928194708_editInitalCreate")]
|
|
partial class editInitalCreate
|
|
{
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "6.0.9")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
|
|
|
modelBuilder.Entity("HomeLibrary.Api.Entities.Author", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Authors");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1,
|
|
Name = "Glen Cook"
|
|
},
|
|
new
|
|
{
|
|
Id = 2,
|
|
Name = "William Shakespeare"
|
|
},
|
|
new
|
|
{
|
|
Id = 3,
|
|
Name = "John Grisham"
|
|
},
|
|
new
|
|
{
|
|
Id = 4,
|
|
Name = "Douglas Adams"
|
|
},
|
|
new
|
|
{
|
|
Id = 5,
|
|
Name = "Piers Anthony"
|
|
},
|
|
new
|
|
{
|
|
Id = 6,
|
|
Name = "Kevin J. Anderson"
|
|
},
|
|
new
|
|
{
|
|
Id = 7,
|
|
Name = "Geoffrey Chaucer"
|
|
},
|
|
new
|
|
{
|
|
Id = 8,
|
|
Name = "L. M. Montgomery"
|
|
},
|
|
new
|
|
{
|
|
Id = 9,
|
|
Name = "Patricia Miles Martin"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("HomeLibrary.Api.Entities.Book", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1);
|
|
|
|
b.Property<int>("AuthorId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("BookNumber")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Series")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Books");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = 1,
|
|
AuthorId = 1,
|
|
BookNumber = 1,
|
|
Series = "The Black Company",
|
|
Title = "Chronicles of The Black Company"
|
|
},
|
|
new
|
|
{
|
|
Id = 2,
|
|
AuthorId = 1,
|
|
BookNumber = 2,
|
|
Series = "The Black Company",
|
|
Title = "Port of Shadows"
|
|
},
|
|
new
|
|
{
|
|
Id = 3,
|
|
AuthorId = 2,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "The Complete Works of William Shakespeare"
|
|
},
|
|
new
|
|
{
|
|
Id = 4,
|
|
AuthorId = 3,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "The Client"
|
|
},
|
|
new
|
|
{
|
|
Id = 5,
|
|
AuthorId = 3,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "Sooley"
|
|
},
|
|
new
|
|
{
|
|
Id = 6,
|
|
AuthorId = 3,
|
|
BookNumber = 3,
|
|
Series = "Theodore Boone",
|
|
Title = "Theodore Boone: The Accused"
|
|
},
|
|
new
|
|
{
|
|
Id = 7,
|
|
AuthorId = 4,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "The Hitchhiker's Guide to the Galaxy"
|
|
},
|
|
new
|
|
{
|
|
Id = 8,
|
|
AuthorId = 5,
|
|
BookNumber = 1,
|
|
Series = "Xanth",
|
|
Title = "Golem in the Gears"
|
|
},
|
|
new
|
|
{
|
|
Id = 9,
|
|
AuthorId = 5,
|
|
BookNumber = 2,
|
|
Series = "Xanth",
|
|
Title = "Demons Don't Dream"
|
|
},
|
|
new
|
|
{
|
|
Id = 10,
|
|
AuthorId = 6,
|
|
BookNumber = 1,
|
|
Series = "Star Wars",
|
|
Title = "Tales of the Bounty Hunters"
|
|
},
|
|
new
|
|
{
|
|
Id = 11,
|
|
AuthorId = 7,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "Canterbury Tales"
|
|
},
|
|
new
|
|
{
|
|
Id = 12,
|
|
AuthorId = 8,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "Anne of Green Gables"
|
|
},
|
|
new
|
|
{
|
|
Id = 13,
|
|
AuthorId = 9,
|
|
BookNumber = 1,
|
|
Series = "None",
|
|
Title = "Trina"
|
|
});
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|