/// <summary> /// Creates the appointment. /// </summary> /// <param name="staff"> /// The staff. /// </param> /// <param name="appointmentDateTimeRange"> /// The appointment date time range. /// </param> /// <returns> /// An Appointment. /// </returns> public Appointment CreateAppointment( Staff staff, DateTimeRange appointmentDateTimeRange ) { var appointment = new Appointment ( staff, appointmentDateTimeRange ); _appointmentRepository.MakePersistent ( appointment ); return appointment; }
/// <summary> /// Destroys the appointment. /// </summary> /// <param name="appointment"> /// The appointment. /// </param> public void DestroyAppointment( Appointment appointment ) { Check.IsNotNull ( appointment, "Appointment is required." ); _appointmentRepository.MakeTransient ( appointment ); }