1

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.

Sebastian
  • 158
  • 1
  • 1
  • 11

1 Answers1

2

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.

ssmith
  • 8,092
  • 6
  • 52
  • 93