Ejemplo n.º 1
0
 public static void TryUpdateManyToMany <T, TKey>(
     this ErrorSolutionDbContext db,
     IEnumerable <T> currentItems,
     IEnumerable <T> newItems,
     Func <T, TKey> getKey
     ) where T : class
 {
     db.Set <T>().RemoveRange(currentItems.Except(newItems, getKey));
     db.Set <T>().AddRange(newItems.Except(currentItems, getKey));
 }
Ejemplo n.º 2
0
 public UnitOfWork(
     ErrorSolutionDbContext context
     )
 {
     Context = context;
 }