protected void Procedure(MigrationActionType action, string procedureName, string bodySql, Action <string, string> createAction) { if (action == MigrationActionType.Up) { createAction(procedureName, bodySql); } else { DropProcedure(procedureName); } }
protected void Table(MigrationActionType action, string tableName, Action <string> createAction) { if (action == MigrationActionType.Up) { createAction(tableName); } else { DropTable(tableName); } }
protected void ActualView(MigrationActionType action, string tableName, string viewName, string[] properties, string[] keys, Func <SqlViewModel, SqlViewModel> sqlAction = null, bool isRegister = false, bool isSimple = false) { if (action == MigrationActionType.Up) { var viewModel = new SqlViewModel(viewName.GetViewName()).Init(tableName, properties, keys, isRegister, isSimple, true); this.ActualEntitiesView(sqlAction != null ? sqlAction(viewModel) : viewModel); } else { this.DropView(tableName.GetViewName()); } }
public MigrationMessage(MigrationActionType action, Exception exception) : this(action, CreateMessage(exception)) { Exception = exception; }
public MigrationMessage(MigrationActionType action, string message) : this() { Action = action; Message = message; }