public ProfileController() { _profileManager = new ProfileManager(); _hobbieManager = new HobbieManager(); _friendRequestManager = new FriendRequestManager(); _friendProfileManager = new FriendProfileManager(); _visitorProfileManager = new VisitorProfileManager(); _profilePostManager = new ProfilePostManager(); }
public IEnumerable <Profile> GetLastFiveVisitor() { var visitorProfileManager = new VisitorProfileManager(); var profileManager = new ProfileManager(); var currentUserId = User.Identity.GetUserId(); var currentProfile = profileManager.GetByUserId(currentUserId); return(visitorProfileManager.GetLastFiveVisitors(currentProfile.Id)); }