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())); } }
public ActionResult Show(AccountShowModel model) { return(RedirectTo <AccountController>(c => c.Show(model.User.Id, model.User.UrlName))); }