示例#1
0
        public ActionResult ShowFollows(string username)
        {
            int  userId        = entities.Users.First(u => u.Username == username).Id;
            bool isFriendsWith = new AccountShowModel(userId).IsFriendsWith;

            if (!entities.Users.First(u => u.Id == userId).HasPrivateProfile || isFriendsWith || username == User.Identity.Name)
            {
                return(PartialView(new FollowListModel(userId)));
            }
            else
            {
                return(PartialView(new FollowListModel()));
            }
        }
示例#2
0
 public ActionResult Show(AccountShowModel model)
 {
     return(RedirectTo <AccountController>(c => c.Show(model.User.Id, model.User.UrlName)));
 }