Exemplo n.º 1
0
        public static CardDto FromCard(Card card)
        {
            var model = new CardDto();

            model.CardId      = card.CardId;
            model.Name        = card.Name;
            model.Description = card.Description;
            return(model);
        }
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Card = CardDto.FromCard(await _context.Cards.FindAsync(request.CardId))
 };
Exemplo n.º 3
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Cards = await _context.Cards.Select(x => CardDto.FromCard(x)).ToListAsync()
 };