//public Driver Driver { get; private set; } //public Location LocationFrom { get; private set; } //public Location LocationTo { get; private set; } //public DateTimeOffset DriveTime { get; private set; } public Ride(CreateRide newRide) { CarType = newRide.CarType; NumPassengers = newRide.NumPassengers; DriverName = newRide.DriverName; rideDate = newRide.RideDate; Cost = newRide.Cost; }
public IActionResult Post(CreateRide newRide) { var ride = new Ride(newRide); return(Accepted(_ridesRepository.AddAsync(ride))); }
public async Task <IActionResult> Post(CreateRide command) { await _busPublisher.SendAsync(command, new CorrelationContext()); return(Accepted()); }