public static void DeleteProductInfoFromId(int id) { using (var db = new MVPOnBoardAPIContext()) { db.Products.Remove(ProductDAL.GetProductFromId(id)); db.SaveChanges(); } }
public void Create(Products product) { ProductDAL.CreateProductInfo(product); }
public void Update(Products product) { ProductDAL.UpdateProductInfoFromId(product); }
public void Delete(int id) { ProductDAL.DeleteProductInfoFromId(id); }
public Products Edit(int id) { return(ProductDAL.GetProductFromId(id)); }
public IEnumerable <Products> Index() { var tempList = ProductDAL.GetAllProducts(); return(tempList); }