From b1fbafff191fed6f9e6da1efb19a088bd42dbf97 Mon Sep 17 00:00:00 2001 From: Yunus Emre Kalkan Date: Mon, 24 Dec 2018 15:32:51 +0300 Subject: [PATCH] Resolved : AggregateRoot.ExtraProperties could not be mapped Ef Core #680 --- docs/en/Tutorials/AspNetCore-Mvc/Part-I.md | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md index 9f766ae3b0..2afe26e7d2 100644 --- a/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md +++ b/docs/en/Tutorials/AspNetCore-Mvc/Part-I.md @@ -82,11 +82,25 @@ namespace Acme.BookStore EF Core requires you to relate entities with your DbContext. The easiest way to do this is to add a `DbSet` property to the `BookStoreDbContext` class in the `Acme.BookStore.EntityFrameworkCore` project, as shown below: ````C# -public class BookStoreDbContext : AbpDbContext -{ - public DbSet Book { get; set; } - ... -} + public class BookStoreDbContext : AbpDbContext + { + public DbSet Book { get; set; } + + public BookStoreDbContext(DbContextOptions options) + : base(options) + { + + } + + protected override void OnModelCreating(ModelBuilder modelBuilder) + { + base.OnModelCreating(modelBuilder); + + modelBuilder.Entity( + b => b.ConfigureExtraProperties() + ); + } + } ```` #### Add New Migration & Update the Database