Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(int id)
        {
            try
            {
                var result = await _service.Delete(id);

                return(Ok(result));
            }
            catch (Exception ex)
            {
                return(Ok(ResponseResult.Failure <OrderDTO>(ex.Message)));
            }
        }
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _services.Delete(id);

            return(result ? (IActionResult)Ok(result) : (IActionResult)BadRequest());
        }