// GET: Collections
        public ActionResult Index()
        {
            CollectionService         cservice = new CollectionService();
            Collection_list_ViewModel clvm     = new Collection_list_ViewModel();

            clvm.WorksPortfolio     = cservice.GetWorks();
            clvm.imgs_Uncategorized = cservice.GetImgs();

            return(View(clvm));
        }
Пример #2
0
        public List <Uncategorized> GetImgs()
        {
            AppleLaLaRepository <Protfolio> ImgInfo = new AppleLaLaRepository <Protfolio>(context);
            var protfolioImg = ImgInfo.GetAll().Take(40).Select((x) => new Uncategorized {
                imgs = x.Photo_url
            }).ToList();
            var cpList_vm = new Collection_list_ViewModel();

            cpList_vm.imgs_Uncategorized = protfolioImg;
            return(protfolioImg);
        }
Пример #3
0
        public List <Work> GetWorks()
        {
            AppleLaLaRepository <Designer> designerWorksInfo = new AppleLaLaRepository <Designer>(context);
            var WorksData   = designerWorksInfo.GetAll();
            var worksDetail = (from d in context.Designer
                               join p in context.Protfolio on d.Designer_id equals p.Designer_id
                               join sd in context.Service_details on p.Service_details_Id equals sd.Service_details_Id
                               join st in context.Service_types on sd.Type_id equals st.Type_id
                               join s in context.Service on st.Service_id equals s.Service_id
                               select new Work {
                Id = d.Designer_id, DesignerName = d.Name, ServiceName = s.Service_name, BtnbgImg = s.Service_photo_url, WorksPic = p.Photo_url, Introduction = d.Description, DesignerPic = d.Photo_rul
            }
                               ).ToList();
            var cwList_vm = new Collection_list_ViewModel();

            cwList_vm.WorksPortfolio = worksDetail;
            return(worksDetail);
        }