示例#1
0
 public ActionResult DeleteFriendship(int friendId)
 {
     try
     {
         var userId = _userRepository.GetUser(User.Identity.Name).UserAccountID;
         _friendshipRepository.DeleteFriendship(userId, friendId);
     }
     catch (Exception e)
     {
         return(View("Error", new ErrorModel {
             Exception = e
         }));
     }
     return(RedirectToAction("Index"));
 }