Beispiel #1
0
        public async Task <IActionResult> Delete(string id)
        {
            try{
                await _itemRepo.DeleteItemAsync(id);

                return(Ok());
            }
            catch (KeyNotFoundException ex) {
                return(NotFound());
            }
            catch (Exception ex) {
                return(StatusCode(StatusCodes.Status500InternalServerError, ex));
            }
        }