コード例 #1
0
        public ActionResult Index(GetCurrentUserNotificationsRequest request)
        {
            request.UserId = User.Id;
            NotificationsListModel model = _userNotificationService.GetCurrentUserNotifications(request);

            return(ViewOrPartial(model, partialViewName: "_Index"));
        }
コード例 #2
0
        public NotificationsListModel GetCurrentUserNotifications(GetCurrentUserNotificationsRequest request)
        {
            NotificationsListModel model = new NotificationsListModel
            {
                Notifications = Mapper.Engine.MapPaged <NotificationMessage, NotificationsListModel.Notification>
                                    (GetNotifications(request.Page - 1, request.PageSize, request.UserId))
            };

            return(model);
        }