예제 #1
0
        public ActionResult Following(string uid, int? page)
        {
            var user = Repository.FindUser(uid);
              if (user == null)
              {
            // TODO: redirect to error page
            return null;
              }

              var model = new PeopleModel
              {
            Account = user.Account,
            Name = user.Name,
            Profiles = Repository.GetFollowings(user.Id, page ?? 0)
              };

              if (IsAjaxRequest())
            return Json(model.Profiles, JsonRequestBehavior.AllowGet);

              return View(model);
        }
예제 #2
0
        public ActionResult Index(int? page)
        {
            var profiles = Repository.GetUserProfiles(Security.CurrentUserId, page ?? 0);
              var model = new PeopleModel { Profiles = profiles };

              if (IsAjaxRequest())
            return Json(model.Profiles, JsonRequestBehavior.AllowGet);

              return View(model);
        }