public AddAircraftTypeResult AddAircraftType(NonNull <AddAircraftTypeParams> @params)
        {
            _commandRouter.Send(new AddAircraftType
            {
                AggregateId     = @params.Value.AircraftType.Value.AggregateId,
                Name            = @params.Value.AircraftType.Value.Name,
                Code            = @params.Value.AircraftType.Value.Code,
                SeatsByDuration = @params.Value.AircraftType.Value.SeatsByDuration.Value
            });

            var aircraftType = _aircraftTypeReadRepository.GetById(@params.Value.AircraftType.Value.AggregateId);

            return(new AddAircraftTypeResult
            {
                AircraftType = aircraftType,
                ClientMutationId = @params.Value.ClientMutationId
            });
        }
 public AircraftTypeModel AircraftTypex([GraphQLArgument(Name = "ID")] string id)
 {
     return(_aircraftTypeReadRepository.GetById(Guid.Parse(id)));
 }
 public ActionResult <AircraftTypeModel> Get(Guid id)
 {
     return(_aircraftTypeReadRepository.GetById(id));
 }
Exemplo n.º 4
0
 public Task <AircraftTypeModel> AircraftType([Inject] IAircraftTypeReadRepository repository, Guid id)
 {
     return(Task.FromResult(repository.GetById(id)));
 }