public ProductsSkuDelete DeleteProductSku(ProductsSkuDelete productsSkuDelete) { using (SqlConnection connection = new SqlConnection(connectionString)) { using (SqlCommand command = new SqlCommand("ProcedureDeleteProductsSKU", connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@SKUIDDelete", productsSkuDelete.ProductSkuID); connection.Open(); command.ExecuteNonQuery(); } return(productsSkuDelete); } }
public IActionResult Delete([FromBody] ProductsSkuDelete productsSkuDelete) { return(Ok(new ProductSkusDataLayer(_configuration).DeleteProductSku(productsSkuDelete))); }