public void DeleteProduct(int?productID) { Repository repo = new Repository(); Product product = repo.Products .Where(p => p.ProductID == productID).FirstOrDefault(); if (product != null) { repo.DeleteProduct(product); } }
public void DeleteProduct(int?productID) { Repository repo = new Repository(); Product product = repo.Products .Where(p => p.ProductID == productID).FirstOrDefault(); if (product != null) { repo.DeleteProduct(product); } }