public void After(InterceptionContext context)
 {
     foreach (var entryWithState in context.EntriesByState)
     {
         foreach (var entry in entryWithState)
         {
             After(entry, entryWithState.Key);
         }
     }
 }
        /// <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();
        }
 public void Before(InterceptionContext context)
 {
     foreach (var entry in context.Entries)
         Before(entry);
 }
 /// <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)
 {
 }