Example #1
0
        public void SetUp()
        {
            userRepository          = new Mock <IUserRepository>();
            userProfileRepository   = new Mock <IUserProfileRepository>();
            followRequestRepository = new Mock <IFollowRequestRepository>();
            followUserRepository    = new Mock <IFollowUserRepository>();
            securityTokenRepository = new Mock <ISecurityTokenRepository>();


            unitOfWork = new Mock <IUnitOfWork>();

            userService          = new UserService(userRepository.Object, unitOfWork.Object, userProfileRepository.Object);
            userProfileService   = new UserProfileService(userProfileRepository.Object, unitOfWork.Object);
            followRequestService = new FollowRequestService(followRequestRepository.Object, unitOfWork.Object);
            followUserService    = new FollowUserService(followUserRepository.Object, unitOfWork.Object);
            securityTokenService = new SecurityTokenService(securityTokenRepository.Object, unitOfWork.Object);

            controllerContext = new Mock <ControllerContext>();
            contextBase       = new Mock <HttpContextBase>();
            httpRequest       = new Mock <HttpRequestBase>();
            httpResponse      = new Mock <HttpResponseBase>();
            genericPrincipal  = new Mock <GenericPrincipal>();
            httpSession       = new Mock <HttpSessionStateBase>();
            authentication    = new Mock <IFormsAuthentication>();


            identity          = new Mock <IIdentity>();
            principal         = new Mock <IPrincipal>();
            tempData          = new Mock <TempDataDictionary>();
            file              = new Mock <HttpPostedFileBase>();
            stream            = new Mock <Stream>();
            accountController = new Mock <AccountController>();
        }
        public void SetUp()
        {
            userRepository = new Mock<IUserRepository>();
            userProfileRepository = new Mock<IUserProfileRepository>();
            followRequestRepository = new Mock<IFollowRequestRepository>();
            followUserRepository = new Mock<IFollowUserRepository>();
            securityTokenRepository = new Mock<ISecurityTokenRepository>();


            unitOfWork = new Mock<IUnitOfWork>();

            userService = new UserService(userRepository.Object, unitOfWork.Object, userProfileRepository.Object);
            userProfileService = new UserProfileService(userProfileRepository.Object, unitOfWork.Object);
            followRequestService = new FollowRequestService(followRequestRepository.Object, unitOfWork.Object);
            followUserService = new FollowUserService(followUserRepository.Object, unitOfWork.Object);
            securityTokenService = new SecurityTokenService(securityTokenRepository.Object, unitOfWork.Object);

            controllerContext = new Mock<ControllerContext>();
            contextBase = new Mock<HttpContextBase>();
            httpRequest = new Mock<HttpRequestBase>();
            httpResponse = new Mock<HttpResponseBase>();
            genericPrincipal = new Mock<GenericPrincipal>();
            httpSession = new Mock<HttpSessionStateBase>();
            authentication = new Mock<IFormsAuthentication>();


            identity = new Mock<IIdentity>();
            principal = new Mock<IPrincipal>();
            tempData = new Mock<TempDataDictionary>();
            file = new Mock<HttpPostedFileBase>();
            stream = new Mock<Stream>();
            accountController = new Mock<AccountController>();

        }
Example #3
0
 public AccountController(IUserService userService, IUserProfileService userProfileService, IGoalService goalService, IUpdateService updateService, ICommentService commentService, IFollowRequestService followRequestService, IFollowUserService followUserService, ISecurityTokenService securityTokenService, UserManager <ApplicationUser> userManager)
 {
     this.userService          = userService;
     this.userProfileService   = userProfileService;
     this.goalService          = goalService;
     this.updateService        = updateService;
     this.commentService       = commentService;
     this.followRequestService = followRequestService;
     this.followUserService    = followUserService;
     this.securityTokenService = securityTokenService;
     this.UserManager          = userManager;
 }
 public AccountController(IUserService userService, IUserProfileService userProfileService, IGoalService goalService, IUpdateService updateService, ICommentService commentService, IFollowRequestService followRequestService, IFollowUserService followUserService, ISecurityTokenService securityTokenService, UserManager<ApplicationUser> userManager)
 {
     this.userService = userService;
     this.userProfileService = userProfileService;
     this.goalService = goalService;
     this.updateService = updateService;
     this.commentService = commentService;
     this.followRequestService = followRequestService;
     this.followUserService = followUserService;
     this.securityTokenService = securityTokenService;
     this.UserManager = userManager;
 }
Example #5
0
 public HomeController(IMetricService metricService, IFocusService focusService, IGoalService goalService, ICommentService commentService, IUpdateService updateService, ISupportService supportService, IUserService userService, IGroupUserService groupUserService, IGroupService groupService, IGroupGoalService groupGoalService, IGroupUpdateService groupupdateService, IGroupCommentService groupcommentService, IFollowUserService followUserService, IGroupUpdateUserService groupUpdateUserService, IGroupCommentUserService groupCommentUserService, ICommentUserService commentUserService)
 {
     this.metricService = metricService;
     this.focusService = focusService;
     this.goalService = goalService;
     this.commentService = commentService;
     this.updateService = updateService;
     this.supportService = supportService;
     this.userService = userService;
     this.groupService = groupService;
     this.groupUserService = groupUserService;
     this.groupGoalService = groupGoalService;
     this.groupupdateService = groupupdateService;
     this.groupcommentService = groupcommentService;
     this.followUserService = followUserService;
     this.groupCommentUserService = groupCommentUserService;
     this.groupUpdateUserService = groupUpdateUserService;
     this.commentUserService = commentUserService;
 }
Example #6
0
 public GroupController(IGroupService groupService, IGroupUserService groupUserService, IUserService userService, IMetricService metricService, IFocusService focusService, IGroupGoalService groupgoalService, IGroupInvitationService groupInvitationService, ISecurityTokenService securityTokenService, IGroupUpdateService groupUpdateService, IGroupCommentService groupCommentService, IGoalStatusService goalStatusService, IGroupRequestService groupRequestService, IFollowUserService followUserService, IGroupCommentUserService groupCommentUserService, IGroupUpdateSupportService groupUpdateSupportService, IGroupUpdateUserService groupUpdateUserService)
 {
     this.groupService              = groupService;
     this.groupInvitationService    = groupInvitationService;
     this.userService               = userService;
     this.groupUserService          = groupUserService;
     this.metricService             = metricService;
     this.focusService              = focusService;
     this.groupGoalService          = groupgoalService;;
     this.securityTokenService      = securityTokenService;
     this.groupUpdateService        = groupUpdateService;
     this.groupCommentService       = groupCommentService;
     this.goalStatusService         = goalStatusService;
     this.groupRequestService       = groupRequestService;
     this.followUserService         = followUserService;
     this.groupCommentUserService   = groupCommentUserService;
     this.groupUpdateSupportService = groupUpdateSupportService;
     this.groupUpdateUserService    = groupUpdateUserService;
 }
Example #7
0
 public HomeController(IMetricService metricService, IFocusService focusService, IGoalService goalService, ICommentService commentService, IUpdateService updateService, ISupportService supportService, IUserService userService, IGroupUserService groupUserService, IGroupService groupService, IGroupGoalService groupGoalService, IGroupUpdateService groupupdateService, IGroupCommentService groupcommentService, IFollowUserService followUserService, IGroupUpdateUserService groupUpdateUserService, IGroupCommentUserService groupCommentUserService, ICommentUserService commentUserService)
 {
     this.metricService           = metricService;
     this.focusService            = focusService;
     this.goalService             = goalService;
     this.commentService          = commentService;
     this.updateService           = updateService;
     this.supportService          = supportService;
     this.userService             = userService;
     this.groupService            = groupService;
     this.groupUserService        = groupUserService;
     this.groupGoalService        = groupGoalService;
     this.groupupdateService      = groupupdateService;
     this.groupcommentService     = groupcommentService;
     this.followUserService       = followUserService;
     this.groupCommentUserService = groupCommentUserService;
     this.groupUpdateUserService  = groupUpdateUserService;
     this.commentUserService      = commentUserService;
 }
Example #8
0
 public GroupController(IGroupService groupService, IGroupUserService groupUserService, IUserService userService, IMetricService metricService, IFocusService focusService, IGroupGoalService groupgoalService, IGroupInvitationService groupInvitationService, ISecurityTokenService securityTokenService, IGroupUpdateService groupUpdateService, IGroupCommentService groupCommentService, IGoalStatusService goalStatusService, IGroupRequestService groupRequestService, IFollowUserService followUserService, IGroupCommentUserService groupCommentUserService, IGroupUpdateSupportService groupUpdateSupportService, IGroupUpdateUserService groupUpdateUserService)
 {
     this.groupService = groupService;
     this.groupInvitationService = groupInvitationService;
     this.userService = userService;
     this.groupUserService = groupUserService;
     this.metricService = metricService;
     this.focusService = focusService;
     this.groupGoalService = groupgoalService; ;
     this.securityTokenService = securityTokenService;
     this.groupUpdateService = groupUpdateService;
     this.groupCommentService = groupCommentService;
     this.goalStatusService = goalStatusService;
     this.groupRequestService = groupRequestService;
     this.followUserService = followUserService;
     this.groupCommentUserService = groupCommentUserService;
     this.groupUpdateSupportService = groupUpdateSupportService;
     this.groupUpdateUserService = groupUpdateUserService;
 }
        internal IEnumerable<NotificationsViewModel> GetNotifications(string userId, IGoalService goalService, ICommentService commentService, IUpdateService updateService, ISupportService supportService, IUserService userService, IGroupService groupService, IGroupUserService groupUserSevice, IGroupGoalService groupGoalService, IGroupCommentService groupcommentService, IGroupUpdateService groupupdateService, IFollowUserService followUserService, IGroupCommentUserService groupCommentUserService, ICommentUserService commentUserService, IGroupUpdateUserService groupUpdateUserService)
        {
            var goals = goalService.GetTop20GoalsofFollowing(userId);
            var comments = commentService.GetTop20CommentsOfPublicGoalFollwing(userId);
            var updates = updateService.GetTop20UpdatesOfFollowing(userId);
            var groupusers = groupUserSevice.GetTop20GroupsUsers(userId);
            var supports = supportService.GetTop20SupportsOfFollowings(userId);
            var groupgoals = groupGoalService.GetTop20GroupsGoals(userId, groupUserSevice);
            var groupupdates = groupupdateService.GetTop20Updates(userId, groupUserSevice);
            var groupComments = groupcommentService.GetTop20CommentsOfPublicGoals(userId, groupUserSevice);
            var followers = followUserService.GetTop20Followers(userId);
            // var groups = groupService.GetTop20Groups(groupids);

            return (from g in goals
                    select new NotificationsViewModel()
                    {
                        GoalId = g.GoalId,
                        UserId = g.UserId,
                        CreatedDate = g.CreatedDate,
                        UserName = g.User.UserName,
                        GoalName = g.GoalName,
                        Desc = g.Desc,
                        ProfilePicUrl = g.User.ProfilePicUrl,
                        Goal = g,
                        NotificationDate = DateCalculation(g.CreatedDate),
                        NotificationType = (int)NotificationType.createdGoal
                    })
                    .Concat(from c in comments
                            select new NotificationsViewModel()
                            {
                                CommentId = c.CommentId,
                                CreatedDate = c.CommentDate,
                                CommentText = c.CommentText,
                                UpdateId = c.UpdateId,
                                GoalName = c.Update.Goal.GoalName,
                                GoalId = c.Update.GoalId,
                                NumberOfComments = commentService.GetCommentsByUpdate(c.UpdateId).Count(),
                                Updatemsg = updateService.GetUpdate(c.UpdateId).Updatemsg,
                                NotificationDate = DateCalculation(c.CommentDate),
                                UserName = commentUserService.GetUser(c.CommentId).UserName,
                                UserId = commentUserService.GetUser(c.CommentId).Id,
                                ProfilePicUrl = commentUserService.GetUser(c.CommentId).ProfilePicUrl,

                                NotificationType = (int)NotificationType.commentedOnUpdate
                            })
                    .Concat(from u in updates
                            select new NotificationsViewModel()
                            {
                                Update = u,
                                UpdateId = u.UpdateId,
                                GoalId = u.GoalId,
                                ProfilePicUrl = u.Goal.User.ProfilePicUrl,
                                GoalName = u.Goal.GoalName,
                                Updatemsg = u.Updatemsg,
                                UserId = u.Goal.UserId,
                                UserName = u.Goal.User.UserName,
                                NumberOfComments = commentService.GetCommentsByUpdate(u.UpdateId).Count(),
                                CreatedDate = u.UpdateDate,
                                NotificationDate = DateCalculation(u.UpdateDate),
                                NotificationType = (int)NotificationType.updatedGoal
                            })
                    .Concat(from gr in groupgoals
                            select new NotificationsViewModel()
                            {

                                GroupGoalId = gr.GroupGoalId,
                                CreatedDate = gr.CreatedDate,

                                UserId = gr.GroupUser.UserId,
                                UserName = userService.GetUser(gr.GroupUser.UserId).UserName,
                                ProfilePicUrl = userService.GetUser(gr.GroupUser.UserId).ProfilePicUrl,

                                GroupName = gr.Group.GroupName,
                                GroupGoalName = gr.GoalName,
                                GroupId = gr.GroupId,
                                NotificationDate = DateCalculation(gr.CreatedDate),
                                NotificationType = (int)NotificationType.createGroup

                            })
                    .Concat(from gu in groupusers
                            select new NotificationsViewModel()
                            {
                                GroupUser = gu,
                                GroupUserId = gu.GroupUserId,

                                UserId = gu.UserId,
                                UserName = userService.GetUser(gu.UserId).UserName,
                                ProfilePicUrl = userService.GetUser(gu.UserId).ProfilePicUrl,

                                GroupName = groupService.GetGroup(gu.GroupId).GroupName,
                                GroupId = gu.GroupId,
                                CreatedDate = gu.AddedDate,
                                NotificationDate = DateCalculation(gu.AddedDate),
                                NotificationType = (int)NotificationType.joinGroup
                            })
                    .Concat(from s in supports
                            select new NotificationsViewModel()
                            {
                                Support = s,
                                SupportId = s.SupportId,
                                GoalName = s.Goal.GoalName,

                                ProfilePicUrl = userService.GetUser(s.UserId).ProfilePicUrl,
                                UserName = userService.GetUser(s.UserId).UserName,
                                UserId = s.UserId,
                                CreatedDate = s.SupportedDate,
                                GoalId = s.GoalId,
                                NotificationDate = DateCalculation(s.SupportedDate),
                                NotificationType = (int)NotificationType.supportGoal
                            })
                    .Concat(from gu in groupupdates
                            select new NotificationsViewModel()
                            {
                                GroupUpdate = gu,
                                GroupUpdateId = gu.GroupUpdateId,
                                GroupUpdatemsg = gu.Updatemsg,

                                UserId = groupUpdateUserService.GetGroupUpdateUser(gu.GroupUpdateId).Id,
                                ProfilePicUrl = groupUpdateUserService.GetGroupUpdateUser(gu.GroupUpdateId).ProfilePicUrl,
                                UserName = groupUpdateUserService.GetGroupUpdateUser(gu.GroupUpdateId).UserName,
                                NotificationDate = DateCalculation(gu.UpdateDate),
                                CreatedDate = gu.UpdateDate,
                                GroupGoalId = gu.GroupGoalId,
                                GroupId = gu.GroupGoal.GroupId,
                                GroupGoalName = gu.GroupGoal.GoalName,
                                GroupName = gu.GroupGoal.Group.GroupName,
                                NotificationType = (int)NotificationType.updatedGroupgoal

                            })
                    .Concat(from gc in groupComments
                            select new NotificationsViewModel()
                            {

                                GroupCommentId = gc.GroupCommentId,
                                GroupCommentText = gc.CommentText,
                                GroupUpdateId = gc.GroupUpdateId,

                                GroupGoalId = gc.GroupUpdate.GroupGoalId,
                                GroupGoalName = gc.GroupUpdate.GroupGoal.GoalName,

                                UserId = groupCommentUserService.GetGroupCommentUser(gc.GroupCommentId).Id,
                                UserName = groupCommentUserService.GetGroupCommentUser(gc.GroupCommentId).UserName,
                                ProfilePicUrl = groupCommentUserService.GetGroupCommentUser(gc.GroupCommentId).ProfilePicUrl,

                                GroupUpdatemsg = gc.GroupUpdate.Updatemsg,
                                GroupId = gc.GroupUpdate.GroupGoal.GroupUser.GroupId,
                                GroupName = gc.GroupUpdate.GroupGoal.Group.GroupName,
                                NotificationDate = DateCalculation(gc.CommentDate),
                                CreatedDate = gc.CommentDate,
                                NotificationType = (int)NotificationType.commentedonGroupUdate
                            })
                    .Concat(from f in followers
                            select new NotificationsViewModel()
                            {
                                FollowUserId = f.FollowUserId,
                                FromUser = f.FromUser,
                                ToUser = f.ToUser,
                                ProfilePicUrl = f.FromUser.ProfilePicUrl,
                                FromUserId = f.FromUserId,
                                ToUserId = f.ToUserId,
                                CreatedDate = f.AddedDate,
                                NotificationDate = DateCalculation(f.AddedDate),
                                NotificationType = (int)NotificationType.followUser
                            }).OrderByDescending(n => n.CreatedDate);
        }
        internal IEnumerable <NotificationsViewModel> GetNotifications(string userId, IGoalService goalService, ICommentService commentService, IUpdateService updateService, ISupportService supportService, IUserService userService, IGroupService groupService, IGroupUserService groupUserSevice, IGroupGoalService groupGoalService, IGroupCommentService groupcommentService, IGroupUpdateService groupupdateService, IFollowUserService followUserService, IGroupCommentUserService groupCommentUserService, ICommentUserService commentUserService, IGroupUpdateUserService groupUpdateUserService)
        {
            var goals         = goalService.GetTop20GoalsofFollowing(userId);
            var comments      = commentService.GetTop20CommentsOfPublicGoalFollwing(userId);
            var updates       = updateService.GetTop20UpdatesOfFollowing(userId);
            var groupusers    = groupUserSevice.GetTop20GroupsUsers(userId);
            var supports      = supportService.GetTop20SupportsOfFollowings(userId);
            var groupgoals    = groupGoalService.GetTop20GroupsGoals(userId, groupUserSevice);
            var groupupdates  = groupupdateService.GetTop20Updates(userId, groupUserSevice);
            var groupComments = groupcommentService.GetTop20CommentsOfPublicGoals(userId, groupUserSevice);
            var followers     = followUserService.GetTop20Followers(userId);

            // var groups = groupService.GetTop20Groups(groupids);

            return((from g in goals
                    select new NotificationsViewModel()
            {
                GoalId = g.GoalId,
                UserId = g.UserId,
                CreatedDate = g.CreatedDate,
                UserName = g.User.UserName,
                GoalName = g.GoalName,
                Desc = g.Desc,
                ProfilePicUrl = g.User.ProfilePicUrl,
                Goal = g,
                NotificationDate = DateCalculation(g.CreatedDate),
                NotificationType = (int)NotificationType.createdGoal
            })
                   .Concat(from c in comments
                           select new NotificationsViewModel()
            {
                CommentId = c.CommentId,
                CreatedDate = c.CommentDate,
                CommentText = c.CommentText,
                UpdateId = c.UpdateId,
                GoalName = c.Update.Goal.GoalName,
                GoalId = c.Update.GoalId,
                NumberOfComments = commentService.GetCommentsByUpdate(c.UpdateId).Count(),
                Updatemsg = updateService.GetUpdate(c.UpdateId).Updatemsg,
                NotificationDate = DateCalculation(c.CommentDate),
                UserName = commentUserService.GetUser(c.CommentId).UserName,
                UserId = commentUserService.GetUser(c.CommentId).Id,
                ProfilePicUrl = commentUserService.GetUser(c.CommentId).ProfilePicUrl,

                NotificationType = (int)NotificationType.commentedOnUpdate
            })
                   .Concat(from u in updates
                           select new NotificationsViewModel()
            {
                Update = u,
                UpdateId = u.UpdateId,
                GoalId = u.GoalId,
                ProfilePicUrl = u.Goal.User.ProfilePicUrl,
                GoalName = u.Goal.GoalName,
                Updatemsg = u.Updatemsg,
                UserId = u.Goal.UserId,
                UserName = u.Goal.User.UserName,
                NumberOfComments = commentService.GetCommentsByUpdate(u.UpdateId).Count(),
                CreatedDate = u.UpdateDate,
                NotificationDate = DateCalculation(u.UpdateDate),
                NotificationType = (int)NotificationType.updatedGoal
            })
                   .Concat(from gr in groupgoals
                           select new NotificationsViewModel()
            {
                GroupGoalId = gr.GroupGoalId,
                CreatedDate = gr.CreatedDate,

                UserId = gr.GroupUser.UserId,
                UserName = userService.GetUser(gr.GroupUser.UserId).UserName,
                ProfilePicUrl = userService.GetUser(gr.GroupUser.UserId).ProfilePicUrl,

                GroupName = gr.Group.GroupName,
                GroupGoalName = gr.GoalName,
                GroupId = gr.GroupId,
                NotificationDate = DateCalculation(gr.CreatedDate),
                NotificationType = (int)NotificationType.createGroup
            })
                   .Concat(from gu in groupusers
                           select new NotificationsViewModel()
            {
                GroupUser = gu,
                GroupUserId = gu.GroupUserId,

                UserId = gu.UserId,
                UserName = userService.GetUser(gu.UserId).UserName,
                ProfilePicUrl = userService.GetUser(gu.UserId).ProfilePicUrl,

                GroupName = groupService.GetGroup(gu.GroupId).GroupName,
                GroupId = gu.GroupId,
                CreatedDate = gu.AddedDate,
                NotificationDate = DateCalculation(gu.AddedDate),
                NotificationType = (int)NotificationType.joinGroup
            })
                   .Concat(from s in supports
                           select new NotificationsViewModel()
            {
                Support = s,
                SupportId = s.SupportId,
                GoalName = s.Goal.GoalName,

                ProfilePicUrl = userService.GetUser(s.UserId).ProfilePicUrl,
                UserName = userService.GetUser(s.UserId).UserName,
                UserId = s.UserId,
                CreatedDate = s.SupportedDate,
                GoalId = s.GoalId,
                NotificationDate = DateCalculation(s.SupportedDate),
                NotificationType = (int)NotificationType.supportGoal
            })
                   .Concat(from gu in groupupdates
                           select new NotificationsViewModel()
            {
                GroupUpdate = gu,
                GroupUpdateId = gu.GroupUpdateId,
                GroupUpdatemsg = gu.Updatemsg,

                UserId = groupUpdateUserService.GetGroupUpdateUser(gu.GroupUpdateId).Id,
                ProfilePicUrl = groupUpdateUserService.GetGroupUpdateUser(gu.GroupUpdateId).ProfilePicUrl,
                UserName = groupUpdateUserService.GetGroupUpdateUser(gu.GroupUpdateId).UserName,
                NotificationDate = DateCalculation(gu.UpdateDate),
                CreatedDate = gu.UpdateDate,
                GroupGoalId = gu.GroupGoalId,
                GroupId = gu.GroupGoal.GroupId,
                GroupGoalName = gu.GroupGoal.GoalName,
                GroupName = gu.GroupGoal.Group.GroupName,
                NotificationType = (int)NotificationType.updatedGroupgoal
            })
                   .Concat(from gc in groupComments
                           select new NotificationsViewModel()
            {
                GroupCommentId = gc.GroupCommentId,
                GroupCommentText = gc.CommentText,
                GroupUpdateId = gc.GroupUpdateId,

                GroupGoalId = gc.GroupUpdate.GroupGoalId,
                GroupGoalName = gc.GroupUpdate.GroupGoal.GoalName,

                UserId = groupCommentUserService.GetGroupCommentUser(gc.GroupCommentId).Id,
                UserName = groupCommentUserService.GetGroupCommentUser(gc.GroupCommentId).UserName,
                ProfilePicUrl = groupCommentUserService.GetGroupCommentUser(gc.GroupCommentId).ProfilePicUrl,

                GroupUpdatemsg = gc.GroupUpdate.Updatemsg,
                GroupId = gc.GroupUpdate.GroupGoal.GroupUser.GroupId,
                GroupName = gc.GroupUpdate.GroupGoal.Group.GroupName,
                NotificationDate = DateCalculation(gc.CommentDate),
                CreatedDate = gc.CommentDate,
                NotificationType = (int)NotificationType.commentedonGroupUdate
            })
                   .Concat(from f in followers
                           select new NotificationsViewModel()
            {
                FollowUserId = f.FollowUserId,
                FromUser = f.FromUser,
                ToUser = f.ToUser,
                ProfilePicUrl = f.FromUser.ProfilePicUrl,
                FromUserId = f.FromUserId,
                ToUserId = f.ToUserId,
                CreatedDate = f.AddedDate,
                NotificationDate = DateCalculation(f.AddedDate),
                NotificationType = (int)NotificationType.followUser
            }).OrderByDescending(n => n.CreatedDate));
        }