Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public IList <Data.AppTrackEntities.industry> GetAllIndustry()
 {
     return(_industryRepository.GetAll());
 }