Esempio n. 1
0
 public void After(InterceptionContext context)
 {
     foreach (var entryWithState in context.EntriesByState)
     {
         foreach (var entry in entryWithState)
         {
             After(entry, entryWithState.Key);
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Executes after the changes to the context.
        /// </summary>
        /// <param name="context">The context.</param>
        public void After(InterceptionContext context)
        {
            foreach (var entryWithState in context.EntriesByState.Where(x => x.Key != EntityState.Unchanged)) // added unchanged filter, so we don't log events for objects that haven't been changed
            {
                foreach (var entry in entryWithState)
                {
                    After(context.ObjectContext, entry, entryWithState.Key);
                }
                
            }

            _logContext.SaveChanges();
        }
Esempio n. 3
0
 public void Before(InterceptionContext context)
 {
     foreach (var entry in context.Entries)
         Before(entry);
 }
Esempio n. 4
0
 /// <summary>
 /// Befores the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 public void Before(InterceptionContext context)
 {
 }
 /// <summary>
 /// Befores the specified context.
 /// </summary>
 /// <param name="context">The context.</param>
 public void Before(InterceptionContext context)
 {
 }