Example #1
0
 public static CardLayoutDto FromCardLayout(CardLayout cardLayout)
 {
     var model = new CardLayoutDto();
     model.CardLayoutId = cardLayout.CardLayoutId;
     model.Name = cardLayout.Name;
     model.Description = cardLayout.Description;
     return model;
 }
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     CardLayouts = await _context.CardLayouts.Select(x => CardLayoutDto.FromCardLayout(x)).ToListAsync()
 };
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     CardLayout = CardLayoutDto.FromCardLayout(await _context.CardLayouts.FindAsync(request.CardLayoutId))
 };