Esempio n. 1
0
 public static void DeleteAndSubmit <T>(this IRepository2 <T> repository,
                                        IEnumerable <T> objList) where T : class
 {
     foreach (var obj in objList)
     {
         repository.Delete(obj);
     }
     repository.SubmitChanges();
 }
Esempio n. 2
0
 public static void InsertAndSubmit <T>(this IRepository2 <T> repository, T obj)
     where T : class
 {
     repository.Insert(obj);
     repository.SubmitChanges();
 }
Esempio n. 3
0
 public static void DeleteAndSubmit <T>(this IRepository2 <T> repository, T obj)
     where T : class
 {
     repository.Delete(obj);
     repository.SubmitChanges();
 }