Esempio n. 1
0
        public async Task <GetAllTasksResponse> Handle(GetAllTasksQuery request, CancellationToken cancellationToken)
        {
            var tasks = _repository.GetAllTodos().OrderByDescending(t => t.Id);

            return(await Task.Run(() => { return new GetAllTasksResponse(tasks); }));
        }