public void AutoExecute() { CodeTrackFactory.Level = CodeTrackLevel.All; using (CodeTrackFactory.TrackReport("AutoExecute", CodeTrackLevel.Bussiness, null, "EFCore", "BeetleX")) { using (NorthwindContext db = new NorthwindContext()) { DBValueList <string> values = (db, "select customerid from customers"); DBObjectList <CustomerName> items = (db, "select CustomerID,CompanyName from customers"); DBExecute <string> id = (db, "select CompanyName from customers where CustomerID='ALFKI'"); DBExecute execute = (db, "delete from customers", " delete from orders"); } } this.Console.WriteLine(CodeTrackFactory.Activity?.GetReport()); }
public void DataBase() { var dataSouce = @"C:\Code\Automation\MiddlewareTests\Tests\TestCaseData\SLT1.json"; _.FetchTestData(dataSouce, "SLT1ValidateRetrieveApplication", "1"); var connectionString = new DBExecute(_.Environment["DbConnUnsecured"]); var result = connectionString.ExecuteQuery(_.TestData["DbQuery"]); Assert.IsTrue(result != null); var result2 = connectionString.ExecuteQuery(_.TestData["DbQuery"]); Assert.IsTrue(result2 != null); connectionString.CloseDB(); Assert.IsTrue(result != null); }
public int BackUp(string Name) { var DBBackupPath = ConfigurationManager.AppSettings["DBBackupPath"]; var fileName = string.Format("{0}_{1}.bak", Name, DateTime.Now.ToFileTime()); var filePath = string.Format("{0}\\{1}", DBBackupPath, fileName); var backSql = string.Format(@" Backup database [5.0] To disk='{1}' With Copy_only", Name, filePath); var connectionString = ConfigurationManager.ConnectionStrings[Name].ConnectionString; DBExecute.ExecuteNonQuery(connectionString, backSql); FileInfo fi = new FileInfo(filePath); return(_IImageGetter.Add(fi)); }
public PageBLL() { _db = new SQLExecute(); }
public ProductBLL() { _db = new SQLExecute(); }
public OrderBLL() { _db = new SQLExecute(); }
public CustomerBLL() { _db = new SQLExecute(); }
public Brand_ProductBLL() { _db = new SQLExecute(); }
public NewsBLL() { _db = new SQLExecute(); }
public static ArrayList executeQuery(string sql) { DBExecute exec = DBExecFactory.GetInstance().getExecuteor(); return(exec.Query(sql)); }
public static void executeNonQuery(string sql) { DBExecute exec = DBExecFactory.GetInstance().getExecuteor(); exec.Execute(sql); }
public BrandBLL() { _db = new SQLExecute(); }
public CategoryBLL() { _db = new SQLExecute(); }
public PaymenMethodsBLL() { _db = new SQLExecute(); }