Exemple #1
0
 private static TResult Db <TResult>(Func <DbDrinksSaleEntities, TResult> predicate)
 {
     using (var db = new DbDrinksSaleEntities())
     {
         return(predicate.Invoke(db));
     }
 }
Exemple #2
0
 private static void Db(Action <DbDrinksSaleEntities> predicate)
 {
     using (var db = new DbDrinksSaleEntities())
     {
         predicate.Invoke(db);
     }
 }