public async Task <IActionResult> Post([FromBody] TodoItemDto item) { try { item = await _appService.UpdateOrInsertItemAsync(item); } catch (Exception e) { Logger.Error(e); return(StatusCode((int)HttpStatusCode.InternalServerError, "error while creating or updating item")); } return(Ok(item)); }