public async Task <ActionResult <ItemView> > Post([FromBody] ItemView itemView) { try { if (ModelState.IsValid) { var createdeItemView = await _itemRepository.AddItemView(itemView); return(CreatedAtAction("Get", new { id = createdeItemView.ItemId }, createdeItemView)); } else { return(BadRequest(ModelState)); } } catch (Exception ex) { return(BadRequest("Failed to save the Item: " + ex.Message)); } }