Use ConfigureByConvention

pull/1595/head
Halil İbrahim Kalkan 6 years ago
parent 7e149b7885
commit 749d6828b9

@ -98,7 +98,7 @@ Open `BookStoreDbContextModelCreatingExtensions.cs` file in the `Acme.BookStore.
builder.Entity<Book>(b =>
{
b.ToTable(BookStoreConsts.DbTablePrefix + "Books", BookStoreConsts.DbSchema);
b.ConfigureAuditedAggregateRoot(); //auto configure for the base class props
b.ConfigureByConvention(); //auto configure for the base class props
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
});
````

@ -17,11 +17,7 @@ namespace Acme.BookStore.EntityFrameworkCore
builder.Entity<Book>(b =>
{
b.ToTable(BookStoreConsts.DbTablePrefix + "Books", BookStoreConsts.DbSchema);
b.ConfigureAudited();
b.ConfigureExtraProperties();
b.ConfigureConcurrencyStamp();
b.ConfigureByConvention();
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
});
}

Loading…
Cancel
Save