Beispiel #1
0
        public ActionResult Friendship(string username, string category)
        {
            var rep      = new FriendshipRepository(context);
            var userRep  = new UserRepository(context);
            var user     = userRep.GetUserByUsername(username);
            var pending  = rep.GetAllPendingRecievedRequests(user);
            var accepted = rep.GetAllAcceptedFriendships(user);
            var model    = new FriendshipsModel()
            {
                Friendships = accepted, PendingRecieved = pending, selectedCategory = category
            };

            return(View(model));
        }