diff --git a/ComputerStoreRestAPI/Controllers/MainController.cs b/ComputerStoreRestAPI/Controllers/MainController.cs index bd3e8bc..57d937f 100644 --- a/ComputerStoreRestAPI/Controllers/MainController.cs +++ b/ComputerStoreRestAPI/Controllers/MainController.cs @@ -94,12 +94,12 @@ namespace ComputerStoreRestAPI.Controllers } } - [HttpDelete] - public bool DeleteProduct(ProductBindingModel product) + [HttpDelete("{id}")] + public bool DeleteProduct(int id) { try { - return _productLogic.Delete(product); + return _productLogic.Delete(new ProductBindingModel { ID = id }); } catch (Exception ex) { @@ -150,12 +150,12 @@ namespace ComputerStoreRestAPI.Controllers } } - [HttpDelete] - public bool DeletePC(PCBindingModel pc) + [HttpDelete("{id}")] + public bool DeletePC(int id) { try { - return _pcLogic.Delete(pc); + return _pcLogic.Delete(new PCBindingModel { ID = id}); } catch (Exception ex) {