예제 #1
0
        public async Task <ActionResult> Index(int page = 1)
        {
            var list   = (await LocationFacade.GetAllAsync()).ToList();
            var toShow = list.Skip((page - 1) * 10).Take(10);

            ViewBag.Count   = list.Count;
            ViewBag.Current = page;
            return(View("~/Views/Admin/Location/Index.cshtml", toShow));
        }
예제 #2
0
        // GET: Map

        public async Task <ActionResult> Index()
        {
            var u = await UserFacade.GetUserAccordingToUsernameAsync(User.Identity.Name);

            if (u.Character == null)
            {
                return(RedirectToAction("Create", "Character"));
            }
            var model = await LocationFacade.GetAllAsync();

            return(View(model));
        }