Пример #1
0
        public async Task <IEnumerable <CategoryDTO> > Get()
        {
            var programs = _BusinessBase.Get().ToList();
            List <CategoryDTO> categorylst = null;

            if (programs != null)
            {
                categorylst = new List <CategoryDTO>();
                foreach (var item in programs)
                {
                    CategoryDTO category = new CategoryDTO();
                    category.Id   = item.Id;
                    category.Name = item.Name;
                    categorylst.Add(category);
                }
            }
            return(categorylst);
        }
Пример #2
0
        public async Task <IEnumerable <AreaDTO> > Get()
        {
            var            states  = _BusinessBase.Get();
            List <AreaDTO> Arealst = null;

            if (states != null)
            {
                Arealst = new List <AreaDTO>();
                foreach (var item in states)
                {
                    AreaDTO area = new AreaDTO();
                    area.AreaName = item.AreaName;
                    area.Id       = item.Id;
                    Arealst.Add(area);
                }
            }
            return(Arealst);
        }
Пример #3
0
        public async Task <IEnumerable <BlogsDTO> > Get()
        {
            var             states    = _BusinessBase.Get();
            List <BlogsDTO> stateslst = null;

            if (states != null)
            {
                stateslst = new List <BlogsDTO>();
                foreach (var item in states)
                {
                    BlogsDTO state = new BlogsDTO();
                    state.Id             = item.Id;
                    state.Description    = item.Description;
                    state.Heading        = item.Heading;
                    state.ImagesUrl      = item.ImagesUrl;
                    state.OtherImagesUrl = item.OtherImagesUrl;
                    state.UserName       = item.UserName;
                    state.UserId         = item.UserId;
                    stateslst.Add(state);
                }
            }
            return(stateslst);
        }