public void Log(IEnumerable <EntityEntry <BaseModel> > entries) { foreach (EntityEntry <BaseModel> entry in entries) { switch (entry.State) { case EntityState.Added: case EntityState.Deleted: case EntityState.Modified: LoggableEntity entity = new LoggableEntity(entry); if (entity.Properties.Any()) { Log(entity); } break; } } }
public void Log(LoggableEntity entity) { Entities.Add(entity); }