Beispiel #1
0
        public async Task <VehicleResponse> GetAsync()
        {
            VehicleReadModel readModel = await _vehicleService.Get();

            return(new VehicleResponse
            {
                Vehicle = readModel,
                Driver = new List <DriverReadModel>
                {
                    new DriverReadModel
                    {
                        ID = 1
                    },
                    new DriverReadModel
                    {
                        ID = 2
                    }
                },
                Status = 1
            });
        }
 public CreateVehicleResponse(VehicleReadModel task, BaseResponse baseResponse)
 {
     Vehicle = task;
     Message = baseResponse.Message;
     Code    = baseResponse.Code;
 }
 public CreateVehicleResponse(VehicleReadModel vehicleRead, string message, ResponseCode code = ResponseCode.Fail) : base(message, code)
 {
     Vehicle = vehicleRead;
 }