public List <CustomerTypeEditModel> GetCustomerTypeItemsForAC(string search) { var ctList = _customerTypeService.Query(x => //x.CustomerTypeCode.StartsWith(search) | x.CustomerTypeDescription.StartsWith(search)) .Select().ToList(); List <CustomerTypeEditModel> ctemList = new List <CustomerTypeEditModel>(); foreach (var item in ctList) { ctemList.Add(BuildCustomerTypeEditModelAC(item)); } return(ctemList); }