コード例 #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)));
 }