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