Пример #1
0
 public static void UsingRead(string connectionString, Action<HotelCoreDataContext> action)
 {
     using (var context = new HotelCoreContext(connectionString))
     {
         action(context.Read);
     }
 }
Пример #2
0
 public static void UsingWrite(Action<HotelCoreDataContext> action)
 {
     using (var context = new HotelCoreContext())
     {
         action(context.Write);
     }
 }
Пример #3
0
 public static void UsingRead(Action<HotelCoreDataContext> action)
 {
     using (var context = new HotelCoreContext())
     {
         action(context.Read);
     }
 }