コード例 #1
0
ファイル: AppointmentFactory.cs プロジェクト: divyang4481/REM
        /// <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;
        }
コード例 #2
0
ファイル: AppointmentFactory.cs プロジェクト: divyang4481/REM
        /// <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 );
        }