public CreateReservation(Guid id, Guid cinemaId, Guid movieId, Guid hallId, Guid?customerId, bool isPaymentUponArrival, DateTime dateTime, IEnumerable <SeatWriteModel> seats, ReserveeWriteModel reservee) { Id = id; CinemaId = cinemaId; MovieId = movieId; HallId = hallId; CustomerId = customerId; DateTime = dateTime; IsPaymentUponArrival = isPaymentUponArrival; Seats = seats; Reservee = reservee; }
public static Reservee AsValueObject(this ReserveeWriteModel reservee) => reservee is null ? null : new Reservee(reservee.FullName, reservee.Email, reservee.PhoneNumber);