0

The Entity:

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

The ModelBuilder:

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

Error:

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

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

1 Answers1

0

It seems like it is an issue in ABP. When having this problem, the only thing helped me is using [Owned] attribute above the value object's class name.