Beispiel #1
0
        public static CardLayoutApiModel FromCardLayout(CardLayout cardLayout)
        {
            var model = new CardLayoutApiModel();

            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 => CardLayoutApiModel.FromCardLayout(x)).ToListAsync()
 };
Beispiel #3
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     CardLayout = CardLayoutApiModel.FromCardLayout(await _context.CardLayouts.FindAsync(request.CardLayoutId))
 };