Beispiel #1
0
        public Guid MakeReservation(ReservationDetail reservationDto)
        {
            _reservationDto = reservationDto;

            // -- assign id to simulate that we have made the reservation.
            _reservationDto.Id = Guid.NewGuid();

            return _reservationDto.Id;
        }
Beispiel #2
0
 public void CancelReservation(ReservationDetail reservationDto)
 {
     throw new NotImplementedException();
 }
Beispiel #3
0
        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);
        }