For references: https://github.com/ardalis/CleanArchitecture
The BaseEntity model contains a List<BaseDomainEvents>
. This list is being ignored in when doing EF Migrations.
public abstract class BaseEntity
{
public int Id { get; set; }
public List<BaseDomainEvent> Events = new List<BaseDomainEvent>();
}
How is this achieved? Nothing in the code indicates that it should be ignored.
CodePudding user response:
It's a field, not a property, so it's ignored. EF only maps properties. Yes, since it's a field, it should probably be named _events
instead of Events
.