public Guid MakeReservation(ReservationDetail reservationDto) { _reservationDto = reservationDto; // -- assign id to simulate that we have made the reservation. _reservationDto.Id = Guid.NewGuid(); return _reservationDto.Id; }
public void CancelReservation(ReservationDetail reservationDto) { throw new NotImplementedException(); }
static void Main(string[] args) { Console.WriteLine("CQRS - sample "); Console.ReadLine(); var res = new ReservationService(); ReservationDetail reservationDto = new ReservationDetail(); reservationDto.ContactNumber = "0173322333"; reservationDto.DateOfGame = DateTime.Today; reservationDto.Name = "Anjam Tahir"; reservationDto.NumberOfSeats = 4; // var id = res.MakeReservation(reservationDto); MakeReservationCommand reservationCommand; reservationCommand.Name = "Anjam"; var id = res.MakeReservation(reservationCommand); }