예제 #1
0
        public ActionResult Profile()
        {
            var U_Name = Session["LogedInUser"].ToString();
            CommunityListViewModel model = new CommunityListViewModel
            {
                Communities = repository.Communities
                .Where(p=>p.Email==U_Name)

            };
            return View(model);
        }
예제 #2
0
        public ViewResult List(int page = 1)
        {
            CommunityListViewModel model = new CommunityListViewModel
            {
                Communities = repository.Communities

                .OrderBy(p => p.ResidentId)
                .Skip((page - 1) * PageSize)
                .Take(PageSize),
                PagingInfo = new PagingInfo
                {
                    CurrentPage = page,
                    ItemsPerPage = PageSize,
                    TotalItems = repository.Communities.Count()
                },

            };
            return View(model);
        }