public async Task <VmServiceTagsItem> GetServiceTagsById(int Id) { var dbPageResult = await repo.Get(Id); if (dbPageResult == null) { return(new VmServiceTagsItem()); } var resultObj = new VmServiceTagsItem(); Copy <Com.BudgetMetal.DBEntities.ServiceTags, VmServiceTagsItem>(dbPageResult, resultObj); var dbIndustryList = await industryRepo.GetAll(); if (dbIndustryList == null) { return(resultObj); } resultObj.IndustryList = new List <VmIndustryItem>(); foreach (var dbcat in dbIndustryList) { VmIndustryItem cat = new VmIndustryItem() { Id = dbcat.Id, Name = dbcat.Name }; resultObj.IndustryList.Add(cat); } return(resultObj); }
public async Task <List <VmIndustryItem> > GetActiveIndustries() { var dbResult = await repo.GetAll(); var resultList = new List <VmIndustryItem>(); foreach (var item in dbResult) { var resultItem = new VmIndustryItem(); Copy <Industry, VmIndustryItem>(item, resultItem); resultList.Add(resultItem); } return(resultList); }
public IEnumerable <DLModel.Industry> getAllIndustry() { IEnumerable <DLModel.Industry> _industry = _iindustryRepository.GetAll().Select(s => new DLModel.Industry().InjectFrom(s)).Cast <DLModel.Industry>().OrderBy(s => s.IndustryName).ToList(); return(_industry); }
public IList <Data.AppTrackEntities.industry> GetAllIndustry() { return(_industryRepository.GetAll()); }