public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Behaviour = BehaviourApiModel.FromBehaviour(await _context.Behaviours
                                                 .Include(x => x.BehaviourType)
                                                 .SingleAsync(x => x.BehaviourId == request.BehaviourId))
 };
Beispiel #2
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Behaviours = await _context.Behaviours.Include(x => x.BehaviourType).Select(x => BehaviourApiModel.FromBehaviour(x)).ToListAsync()
 };
Beispiel #3
0
 public async Task <Response> Handle(Request request, CancellationToken cancellationToken)
 => new Response()
 {
     Behaviour = BehaviourApiModel.FromBehaviour(await _context.Behaviours.FindAsync(request.BehaviourId))
 };