Esempio n. 1
0
        public async Task <IActionResult> Delete(string id)
        {
            try
            {
                await _appService.DeleteItemAsync(id);
            }
            catch (ArgumentException e)
            {
                return(BadRequest(e.Message));
            }
            catch (Exception e)
            {
                Logger.Error(e);
                return(StatusCode((int)HttpStatusCode.InternalServerError, "error while deleting item"));
            }

            return(Ok());
        }