public ProductQuantitiesDelete DeleteProductQuantitiy(ProductQuantitiesDelete productQuantitiesDelete) { using (SqlConnection connection = new SqlConnection(connectionString)) { using (SqlCommand command = new SqlCommand("ProcedureDeleteProductsQuantity", connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@ProductIDDelete", productQuantitiesDelete.ProductID); connection.Open(); command.ExecuteNonQuery(); } return(productQuantitiesDelete); } }
public IActionResult Delete([FromBody] ProductQuantitiesDelete productQuantitiesDelete) { return(Ok(new ProductQuantitiesDataLayer(_configuration).DeleteProductQuantitiy(productQuantitiesDelete))); }