示例#1
0
 private T Fun <T, T2>(Func <T2, T> function, T2 Id)
 {
     try
     {
         sqLiteHelper = new SqLiteHelper("data source=mydb2.db");
         return(function.Invoke(Id));
     }
     finally {
         sqLiteHelper.CloseConnection();
     }
 }
示例#2
0
 private void Act(Action act)
 {
     try
     {
         sqLiteHelper = new SqLiteHelper("data source=mydb2.db");
         act.Invoke();
     }
     finally
     {
         sqLiteHelper.CloseConnection();
     }
 }