Exemplo n.º 1
0
        public async Task <ActionResult <List <NotifyMessage> > > GetAllNotifications(GetAllDto data)
        {
            var guidUserId = Guid.Parse(data.UserId);

            return(await _context.Notify.Where(n => n.ObervableUserId == guidUserId)
                   .OrderByDescending(n => n.DateTimeCreated)
                   .Select(n => new NotifyMessage
            {
                Id = n.Id,
                User = new AppUser
                {
                    Id = n.NotifierUser.Id,
                    Name = n.NotifierUser.Name,
                    CoverImageExtension = n.NotifierUser.CoverImageExtension
                },
                Message = n.Message,
                Time = n.DateTimeCreated
            }).Skip(data.Taken).Take(data.ToTake).ToListAsync());
        }
Exemplo n.º 2
0
        public Task <List <AppxVolume> > GetAll(CancellationToken cancellationToken = default, IProgress <ProgressData> progress = default)
        {
            var proxyObject = new GetAllDto();

            return(this.client.Get(proxyObject, cancellationToken, progress));
        }