예제 #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;
         }
     }
 }
예제 #2
0
 public void Log(LoggableEntity entity)
 {
     Entities.Add(entity);
 }