/// <summary>
        /// Returns a single StandardAppointmentException where the id in the request matches the record ID in the database.
        /// </summary>
        /// <param name="request">The request used for requesting the record from the database.</param>
        /// <returns>If FetchLazy was set to false, the JarsStandardAppointmentException item will be populated, if not then the JarsStandardAppointmentExceptionBase record will be filled with data.</returns>
        public virtual StandardAppointmentExceptionsResponse Any(GetStandardAppointmentException request)
        {
            return(ExecuteFaultHandledMethod(() =>
            {
                StandardAppointmentExceptionsResponse response = new StandardAppointmentExceptionsResponse();

                //IStandardAppointmentExceptionRepository _repository = _DataRepositoryFactory.GetDataRepository<IStandardAppointmentExceptionRepository>();
                var _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <StandardAppointmentException, IDataContextNhJars> >();
                response.AppointmentException = _repository.GetById(request.Id, request.FetchEagerly).ConvertTo <StandardAppointmentExceptionDto>();
                return response;
            }));
        }
 /// <summary>
 /// Update or create a single StandardAppointmentException or a list of StandardAppointmentExceptions, depending on whether the StandardAppointmentException or StandardAppointmentExceptions property has got a value set.
 /// If the StandardAppointmentException property is set the StandardAppointmentException will be created or updated and the StandardAppointmentExceptions property will be ignored.
 /// To create or update more than one StandardAppointmentException, assign a list to the StandardAppointmentExceptions property and make sure StandardAppointmentException is set to nothing/null.
 /// </summary>
 /// <param name="request">The request containing the StandardAppointmentException or StandardAppointmentExceptions that needs to be created or updated</param>
 /// <returns>depending on the values supplied, the updated StandardAppointmentException or StandardAppointmentExceptions will be returned.</returns>
 public virtual StandardAppointmentExceptionsResponse Any(StoreStandardAppointmentExceptions request)
 {
     return(ExecuteFaultHandledMethod(() =>
     {
         StandardAppointmentExceptionsResponse response = new StandardAppointmentExceptionsResponse();
         //IStandardAppointmentExceptionRepository _repository = _DataRepositoryFactory.GetDataRepository<IStandardAppointmentExceptionRepository>();
         var _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <StandardAppointmentException, IDataContextNhJars> >();
         IList <StandardAppointmentException> exList = request.AppointmentExceptions.ConvertAll(x => x.ConvertTo <StandardAppointmentException>());
         exList = _repository.CreateUpdateList(exList, CurrentSessionUsername).ToList();
         response.AppointmentExceptions = exList.ToList().ConvertAll(x => x.ConvertTo <StandardAppointmentExceptionDto>());
         TrySendStoreNotificationToChannel(typeof(StandardAppointmentException).Name, exList, request.IsAppointment);
         return response;
     }));
 }
        /// <summary>
        /// Find a StandardAppointmentException by specifying values for the properties available in the request.
        /// Date values: Start date will go from date forward, end date will be from end date back, and if both has values,
        /// it will be used as from (between) start to end
        /// </summary>
        /// <param name="request">The request used for building the find parameters</param>
        /// <returns>If LoadLazy was true, then a list of JarsStandardAppointmentExceptionBase items, otherwise a list of fully loaded JarsStandardAppointmentExceptions</returns>
        public virtual StandardAppointmentExceptionsResponse Any(FindStandardAppointmentExceptions request)
        {
            return(ExecuteFaultHandledMethod(() =>
            {
                StandardAppointmentExceptionsResponse response = new StandardAppointmentExceptionsResponse();
                if (request != null)
                {
                    var query = BuildQuery <StandardAppointmentException>(request);
                    //var _repository = _DataRepositoryFactory.GetDataRepository<IStandardAppointmentExceptionRepository>();
                    var _repository = _DataRepositoryFactory.GetDataRepository <IGenericEntityRepositoryBase <StandardAppointmentException, IDataContextNhJars> >();

                    response.AppointmentExceptions = _repository.Where(query).ToList().ConvertAll(x => x.ConvertTo <StandardAppointmentExceptionDto>());
                }
                return response;
            }));
        }