Exemplo n.º 1
0
        public IEnumerable <InspectionViewModel> GetForSuggestion(string textSearch, string objectI)
        {
            var searchModel =
                _inspectionRepository.Query(p => (p.InspectionN.Contains(textSearch) || p.InspectionC.ToString().Contains(textSearch)) && p.ObjectI == objectI);

            var destination = Mapper.Map <IEnumerable <Inspection_M>, IEnumerable <InspectionViewModel> >(searchModel);

            return(destination);
        }