Как отображение ValueObject в EFCore3.1 - PullRequest
0 голосов
/ 19 марта 2020

Объект:

public class Good : FullAuditedAggregateRoot<Guid>
{
   ///******///
  public virtual SaleStates SaleStates { get; set; }
}

ModelBuilder:

builder.Entity<Good>(b =>
{
  ///******///
  b.OwnsOne(f=>f.SaleStates).WithOwner();
}

Ошибка:

System.InvalidOperationException : The type 'SaleStates' cannot be marked as owned because a non-owned entity type with the same name already exists.

https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/breaking-changes#config

...