public RedirectResult RedirectToFriendLink(string slug) { var friendLink = _friendLinkService.Get(slug); if (friendLink == null) { throw new HttpException((int)HttpStatusCode.NotFound, "FriendLink couldn't be not found."); } return(Redirect(friendLink.Url)); }
public virtual RedirectResult RedirectTo(string slug) { var friendLink = _friendLinkService.Get(slug); if (friendLink == null || !friendLink.IsActive) { throw new HttpException((int)HttpStatusCode.NotFound, "FriendLink couldn't be found."); } return(Redirect(friendLink.Url)); }