Esempio n. 1
0
 public override Task <IPagedResult <BlogModel> > ReadPagedListAsync(FilteredPagedRequestModel model,
                                                                     CancellationToken cancellationToken = default)
 {
     return(EntitySet.AsNoTracking()
            .Select(b => new BlogModel
     {
         Id = b.Id, Version = b.Version, Url = b.Url, Title = b.Title
     }).ToPagedListAsync(model, cancellationToken));
 }
 public override Task <IPagedResult <InvoiceReadModel> > ReadPagedListAsync(FilteredPagedRequestModel model,
                                                                            CancellationToken cancellationToken = default)
 {
     return(EntitySet.AsNoTracking().Select(i => new InvoiceReadModel
     {
         Id = i.Id,
         Number = i.Number,
         CreatedDateTime = i.CreatedDateTime
     }).ToPagedListAsync(model, cancellationToken));
 }
Esempio n. 3
0
 public override Task <IPagedResult <RoleReadModel> > ReadPagedListAsync(FilteredPagedRequestModel model,
                                                                         CancellationToken cancellationToken = default)
 {
     return(EntitySet.AsNoTracking()
            .Select(r => new RoleReadModel
     {
         Id = r.Id,
         Name = r.Name,
         Description = r.Description
     }).ToPagedListAsync(model, cancellationToken));
 }
Esempio n. 4
0
 public override Task <IPagedResult <ProductModel> > ReadPagedListAsync(FilteredPagedRequestModel model,
                                                                        CancellationToken cancellationToken = default)
 {
     return(EntitySet.AsNoTracking().Select(p => new ProductModel
     {
         Id = p.Id,
         Version = p.Version,
         Title = p.Title,
         Number = p.Number
     }).ToPagedListAsync(model, cancellationToken));
 }
 public override Task <IPagedResult <UserReadModel> > ReadPagedListAsync(FilteredPagedRequestModel model,
                                                                         CancellationToken cancellationToken = default)
 {
     return(EntitySet.AsNoTracking()
            .Select(u => new UserReadModel
     {
         Id = u.Id,
         IsActive = u.IsActive,
         UserName = u.UserName,
         DisplayName = u.DisplayName,
         LastLoggedInDateTime = u.LastLoggedInDateTime
     }).ToPagedListAsync(model, cancellationToken));
 }
Esempio n. 6
0
 protected override Task <IPagedResult <TModel> > ReadPagedListAsync(FilteredPagedRequestModel model,
                                                                     CancellationToken cancellationToken)
 {
     return(CrudService.ReadPagedListAsync(model, cancellationToken));
 }