Esempio n. 1
0
        public virtual async Task <PagedResultDto <UserSubscreNotificationDto> > GetListAsync(SubscriptionsGetByPagedDto input)
        {
            var userSubscribedCount = await UserSubscribeRepository.GetCountAsync(CurrentUser.GetId());

            var userSubscribes = await UserSubscribeRepository
                                 .GetUserSubscribesAsync(CurrentUser.GetId(), input.Sorting,
                                                         input.SkipCount, input.MaxResultCount);

            return(new PagedResultDto <UserSubscreNotificationDto>(userSubscribedCount,
                                                                   userSubscribes.Select(us => new UserSubscreNotificationDto {
                Name = us.NotificationName
            }).ToList()));
        }
Esempio n. 2
0
 public virtual async Task <PagedResultDto <UserSubscreNotificationDto> > GetListAsync(SubscriptionsGetByPagedDto input)
 {
     return(await _subscriptionAppService.GetListAsync(input));
 }
 public virtual async Task <PagedResultDto <NotificationSubscriptionInfo> > GetSubscribedsAsync(SubscriptionsGetByPagedDto subscriptionsGetByPaged)
 {
     return(await _subscriptionAppService.GetSubscribedsAsync(subscriptionsGetByPaged));
 }
        public virtual async Task <PagedResultDto <NotificationSubscriptionInfo> > GetSubscribedsAsync(SubscriptionsGetByPagedDto subscriptionsGetByPaged)
        {
            var userSubscribedCount = await _userSubscribeRepository.GetCountAsync(CurrentUser.GetId());

            var userSubscribes = await _userSubscribeRepository
                                 .GetUserSubscribesAsync(CurrentUser.GetId(), subscriptionsGetByPaged.Sorting,
                                                         subscriptionsGetByPaged.SkipCount, subscriptionsGetByPaged.MaxResultCount);

            return(new PagedResultDto <NotificationSubscriptionInfo>(userSubscribedCount,
                                                                     ObjectMapper.Map <List <UserSubscribe>, List <NotificationSubscriptionInfo> >(userSubscribes)));
        }