Exemplo n.º 1
0
 public async Task <GetFeedbackByIdResponse> Handle(GetFeedbackByIdRequest request)
 {
     return(new GetFeedbackByIdResponse()
     {
         Feedback = FeedbackApiModel.FromFeedback(await _context.Feedbacks.FindAsync(request.Id))
     });
 }
Exemplo n.º 2
0
            public async Task <Response> Handle(Request request)
            {
                var feedbacks = await _context.Feedbacks.ToListAsync();

                return(new Response()
                {
                    Feedbacks = feedbacks.Select(x => FeedbackApiModel.FromFeedback(x)).ToList()
                });
            }