public static void RunDBScript(this Database database, string dbScriptName) { using (var db = new O2DataMart()) { var sql = Util.Database.GetDBScript(dbScriptName); db.Database.ExecuteSqlCommand(TransactionalBehavior.DoNotEnsureTransaction, sql); } }
public static string GetDBScript(this Database database, string dbScriptName) { return(Util.Assembly.GetTextResource <DBScriptsFolder>(dbScriptName)); }
public static void ResetData(this Database database) { Util.Database.RunDBScript("DataMart-Reset.sql"); }