public virtual async Task <PagedResultDto <NotificationInfo> > GetListAsync(UserNotificationGetByPagedDto input)
        {
            var notificationCount = await NotificationStore
                                    .GetUserNotificationsCountAsync(
                CurrentTenant.Id,
                CurrentUser.GetId(),
                input.Filter,
                input.ReadState);

            var notifications = await NotificationStore
                                .GetUserNotificationsAsync(
                CurrentTenant.Id, CurrentUser.GetId(),
                input.Filter, input.Sorting, input.Reverse,
                input.ReadState, input.SkipCount, input.MaxResultCount);

            return(new PagedResultDto <NotificationInfo>(notificationCount, notifications));
        }
Example #2
0
 public virtual async Task <PagedResultDto <NotificationInfo> > GetUserNotificationsAsync(UserNotificationGetByPagedDto userNotificationGetByPaged)
 {
     return(await _notificationAppService.GetUserNotificationsAsync(userNotificationGetByPaged));
 }
Example #3
0
        public virtual async Task <PagedResultDto <NotificationInfo> > GetUserNotificationsAsync(UserNotificationGetByPagedDto userNotificationGetByPaged)
        {
            var notificationCount = await _userNotificationRepository
                                    .GetCountAsync(CurrentUser.GetId(), userNotificationGetByPaged.Filter,
                                                   userNotificationGetByPaged.ReadState);

            var notifications = await _userNotificationRepository
                                .GetNotificationsAsync(CurrentUser.GetId(), userNotificationGetByPaged.Filter,
                                                       userNotificationGetByPaged.Sorting, userNotificationGetByPaged.ReadState,
                                                       userNotificationGetByPaged.SkipCount, userNotificationGetByPaged.MaxResultCount
                                                       );

            return(new PagedResultDto <NotificationInfo>(notificationCount,
                                                         ObjectMapper.Map <List <Notification>, List <NotificationInfo> >(notifications)));
        }
Example #4
0
 public virtual async Task <PagedResultDto <NotificationInfo> > GetListAsync(UserNotificationGetByPagedDto input)
 {
     return(await MyNotificationAppService.GetListAsync(input));
 }