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)); }
public IPagedList <PhoneNumberListItem> Handle(PhoneNumberListQuery message) { return(null); //return db.PhoneNumbers.OrderBy(p => p.Label) // .ProjectToPagedList<PhoneNumberListItem>(message.PageNumber ?? 1, 5); }
public async Task <IActionResult> Index(PhoneNumberListQuery query) { var results = await mediator.Send(query); return(View(results)); }