// GET: Friend/Details/{id}
        public ActionResult Details(int id)
        {
            var friendDetails = repository.GetFriendById(id);

            return(View(new FriendViewModel
            {
                FriendId = friendDetails.FriendId,
                FriendName = friendDetails.FriendName,
                FriendLastName = friendDetails.FriendLastName,
                FriendBirthDate = friendDetails.FriendBirthDate,
                FriendDaysToBirthDate = friendDetails.FriendDaysToBirthDate,
            }));
        }
Esempio n. 2
0
        public ActionResult Edit(int id)
        {
            var             repository = new FriendsRepository();
            FriendViewModel fv         = repository.GetFriendById(id);

            return(View(fv));
        }
Esempio n. 3
0
        public ActionResult Details(int id)
        {
            var repo = new FriendsRepository();
            var fv   = repo.GetFriendById(id);

            return(View(fv));
        }
Esempio n. 4
0
        public ActionResult Delete(int id)
        {
            var repository = new FriendsRepository();

            return(View(repository.GetFriendById(id)));
        }