实体:
public class Good : FullAuditedAggregateRoot<Guid>
{
///******///
public virtual SaleStates SaleStates { get; set; }
}
模型构建器:
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/break-changes#config