Exemple #1
0
        public IActionResult Test2()
        {
            IDbConnection db = new SqlConnection("Server=GWJSN13\\SQLEXPRESS; Database=Coffee2; user id=admin; password=pass1;");

            db.Open();
            CoffeeTable.Delete(4);
            db.Close();
            return(View("Delete"));
        }
Exemple #2
0
        public IActionResult Delete(long ProductID)
        {
            //IDbConnection db = new SqlConnection("Server=GWJSN13\\SQLEXPRESS; Database=Coffee2; user id=admin; password=pass1;");
            //db.Open();
            //CoffeeTable.Delete(ProductID);
            //db.Close();
            //return View("Add");

            CoffeeTable.Read(ProductID);
            CoffeeTable.Delete(ProductID);
            return(View("Delete"));
        }