public bool DeleteProduct(int id) { if (repository.Delete(id)) { return(true); } else { return(false); } }
public IHttpActionResult DeleteProduct(string id) { ProductAPI.core.Entities.Product product = db.GetById(id); if (product == null) { return(NotFound()); } db.Delete(id); return(Ok(product)); }
public async Task <ActionResult> DeleteProduct(string id) { return(Ok(await _productRepositories.Delete(id))); }