public IHttpActionResult GetInventoryItem(int id) { EntityMapper <InventoryItem, ApiInventoryItem> mapObj = new EntityMapper <InventoryItem, ApiInventoryItem>(); InventoryItem dalItem = _itemService.GetInventoryItem(id); ApiInventoryItem inventoryItem = new ApiInventoryItem(); inventoryItem = mapObj.Translate(dalItem); if (inventoryItem == null) { return(NotFound()); } return(Ok(inventoryItem)); }