Ejemplo n.º 1
0
 /// <summary>
 /// 默认构造
 /// </summary>
 /// <param name="dataBase"></param>
 public DbSession(INPocoDataBase dataBase)
 {
     this.DataContext = dataBase;
 }
 public static INPocoDataBase OnDeleting(this INPocoDataBase database, Func <DeleteContext, bool> func)
 {
     database.OnDeletingFun = func;
     return(database);
 }
 public static INPocoDataBase OnException(this INPocoDataBase database, Action <Exception> action)
 {
     database.OnExceptionAction = action;
     return(database);
 }
 public static INPocoDataBase OnInserting(this INPocoDataBase database, Func <InsertContext, bool> func)
 {
     database.OnInsertingFun = func;
     return(database);
 }
        public static INPocoDataBase OnExecutingCommand(this INPocoDataBase database, Action <DbCommand> action)
        {
            database.OnExecutingAction = action;

            return(database);
        }