Ejemplo n.º 1
0
 public void Log(IEnumerable <DbEntityEntry <BaseModel> > entries)
 {
     foreach (DbEntityEntry <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;
         }
     }
 }
Ejemplo n.º 2
0
 public void Log(LoggableEntity entity)
 {
     Entities.Add(entity);
 }