示例#1
0
        public async Task <ActionResult> DeleteInvoice(int id)
        {
            try
            {
                await _invoiceRepository.DeleteAsync(id);

                return(Ok());
            }
            catch (DBNotFoundException)
            {
                return(NotFound());
            }
            catch (Exception)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError));
            }
        }