// 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, })); }
public ActionResult Edit(int id) { var repository = new FriendsRepository(); FriendViewModel fv = repository.GetFriendById(id); return(View(fv)); }
public ActionResult Details(int id) { var repo = new FriendsRepository(); var fv = repo.GetFriendById(id); return(View(fv)); }
public ActionResult Delete(int id) { var repository = new FriendsRepository(); return(View(repository.GetFriendById(id))); }