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)) };
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() };