public async Task <IActionResult> Items(GetAllToDoItemsQuery query, int page = 1) { var items = await Mediator.Send(query); var pagedItems = items.ToDoItems.ToPagedList(page, 6); ViewBag.ItemsPage = pagedItems; return(View(items)); }
public Task <IReadOnlyCollection <ToDoItem> > Handle(GetAllToDoItemsQuery request, CancellationToken cancellationToken) { return(_repository.GetAll()); }
public async Task <IReadOnlyCollection <ToDoItem> > ExecuteAsync( GetAllToDoItemsQuery command, IReadOnlyCollection <ToDoItem> previousResult) { return(await _repository.Get(command.UserId)); }
public Task <IReadOnlyCollection <ToDoItem> > ExecuteAsync(GetAllToDoItemsQuery command, IReadOnlyCollection <ToDoItem> previousResult) { return(_repository.GetAll()); }