Пример #1
0
        public async Task <ActionResult> DeleteProduct(int?id)
        {
            int result = 0;

            try
            {
                result = await _service.DeleteProduct(id);

                if (result == 0)
                {
                    return(NotFound());
                }
                return(Ok());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }