示例#1
0
        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);
            }
        }
示例#2
0
 public IActionResult Delete([FromBody] ProductQuantitiesDelete productQuantitiesDelete)
 {
     return(Ok(new ProductQuantitiesDataLayer(_configuration).DeleteProductQuantitiy(productQuantitiesDelete)));
 }