public async Task <ActionResult <ShoppingListItem> > PostAsync([FromBody] ShoppingListItem listItem) { _logger.LogInformation($"Creating shopping list item..."); var created = await _service.CreateShoppingListItemAsync( _mapper.Map <DAL.Entities.ShoppingListItem>(listItem)); _logger.LogInformation($"Created shopping list item [{created.Id}]."); return(CreatedAtAction( "GetShoppingList", new { id = created.ShoppingListId }, _mapper.Map <ShoppingListItem>(created))); }