예제 #1
0
 public async Task <IPagedList <PhoneNumberListItem> > Handle(PhoneNumberListQuery message,
                                                              CancellationToken cancellationToken)
 {
     return(await db.UserPhoneNumbers.OrderBy(p => p.Label)
            .ProjectToPagedListAsync <PhoneNumberListItem>(mapper.ConfigurationProvider, message.PageNumber ?? 1, 5));
 }
예제 #2
0
 public IPagedList <PhoneNumberListItem> Handle(PhoneNumberListQuery message)
 {
     return(null);
     //return db.PhoneNumbers.OrderBy(p => p.Label)
     //    .ProjectToPagedList<PhoneNumberListItem>(message.PageNumber ?? 1, 5);
 }
예제 #3
0
        public async Task <IActionResult> Index(PhoneNumberListQuery query)
        {
            var results = await mediator.Send(query);

            return(View(results));
        }