public JsonResult GetItem(string itemid, string foranimal, string category, string subcategory, string name) { List <Item> listObj = new List <Item>(); var replistObj = _vendor.GetItem(itemid, foranimal, category, subcategory, name); if (replistObj != null) { foreach (var obj in replistObj) { Item itemObj = _mapper.Map <Item>(obj); listObj.Add(itemObj); } } return(new JsonResult(listObj)); }