Пример #1
0
 public static void Borrow(Action <ProoftedDbContext> action)
 {
     using (var context = new ProoftedDbContext())
     {
         action(context);
     }
 }
Пример #2
0
 public static T Borrow <T>(Func <ProoftedDbContext, T> func)
 {
     using (var context = new ProoftedDbContext())
     {
         return(func(context));
     }
 }