protected DatabaseContextContructorParameter(string dataConfigurationDllName, string dataConfigurationClassFullName, string databaseConnectionString, IEntityAuditService entityAuditService)
        {
            if (string.IsNullOrEmpty(dataConfigurationDllName))
            {
                throw new ArgumentNullException(nameof(dataConfigurationDllName));
            }

            if (string.IsNullOrEmpty(dataConfigurationClassFullName))
            {
                throw new ArgumentNullException(nameof(dataConfigurationClassFullName));
            }

            if (string.IsNullOrEmpty(databaseConnectionString))
            {
                throw new ArgumentNullException(nameof(databaseConnectionString));
            }

            if (entityAuditService == null)
            {
                throw new ArgumentNullException(nameof(entityAuditService));
            }

            DatabaseConnectionString       = databaseConnectionString;
            EntityAuditService             = entityAuditService;
            DataConfigurationDllName       = dataConfigurationDllName;
            DataConfigurationClassFullName = dataConfigurationClassFullName;
        }
示例#2
0
        public DatabaseContext(string dataConfigurationDllName, string dataConfigurationClassFullName, string databaseConnectionString, IEntityAuditService entityAuditService)
            : base(databaseConnectionString)
        {
            if (string.IsNullOrEmpty(dataConfigurationDllName))
            {
                throw new ArgumentNullException(nameof(dataConfigurationDllName));
            }

            if (string.IsNullOrEmpty(dataConfigurationClassFullName))
            {
                throw new ArgumentNullException(nameof(dataConfigurationClassFullName));
            }

            if (entityAuditService == null)
            {
                throw new ArgumentNullException(nameof(entityAuditService));
            }

            _dataConfigurationDllName              = dataConfigurationDllName;
            _dataConfigurationClassFullName        = dataConfigurationClassFullName;
            _entityAuditService                    = entityAuditService;
            GetObjectContext().CommandTimeout      = DefaultCommandTimeOut;
            Configuration.LazyLoadingEnabled       = false;
            Configuration.ProxyCreationEnabled     = false;
            Configuration.AutoDetectChangesEnabled = false;
        }
示例#3
0
 //
 // Summary:
 //     /// Method responsible for initializing the service. ///
 //
 // Parameters:
 //   interviewRepository:
 //     The interviewRepository param.
 //
 //   personRepository:
 //     The personRepository param.
 //
 //   entityAuditService:
 //     The entityAuditService param.
 //
 //   interviewValidator:
 //     The interviewValidator param.
 //
 public InterviewService(IInterviewRepository interviewRepository, IPersonRepository personRepository, IEntityAuditService entityAuditService, IValidator <InterviewCommand> interviewValidator)
 {
     _interviewRepository = interviewRepository;
     _personRepository    = personRepository;
     _entityAuditService  = entityAuditService;
     _interviewValidator  = interviewValidator;
 }
 //
 // Summary:
 //     /// Method responsible for initializing the service. ///
 //
 // Parameters:
 //   addressRepository:
 //     The addressRepository param.
 //
 //   personRepository:
 //     The personRepository param.
 //
 //   entityAuditService:
 //     The entityAuditService param.
 //
 //   addressValidator:
 //     The addressValidator param.
 //
 public AddressService(IAddressRepository addressRepository, IPersonRepository personRepository, IEntityAuditService entityAuditService, IValidator <AddressCommand> addressValidator)
 {
     _addressRepository  = addressRepository;
     _personRepository   = personRepository;
     _entityAuditService = entityAuditService;
     _addressValidator   = addressValidator;
 }
示例#5
0
 //
 // Summary:
 //     /// Method responsible for initializing the service. ///
 //
 // Parameters:
 //   personRepository:
 //     The personRepository param.
 //
 //   addressRepository:
 //     The addressRepository param.
 //
 //   interviewRepository:
 //     The interviewRepository param.
 //
 //   entityAuditService:
 //     The entityAuditService param.
 //
 //   personValidator:
 //     The personValidator param.
 //
 public PersonService(IPersonRepository personRepository, IAddressRepository addressRepository, IInterviewRepository interviewRepository, IEntityAuditService entityAuditService, IValidator <PersonCommand> personValidator)
 {
     _personRepository    = personRepository;
     _addressRepository   = addressRepository;
     _interviewRepository = interviewRepository;
     _entityAuditService  = entityAuditService;
     _personValidator     = personValidator;
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EntityService" /> class.
 /// </summary>
 /// <param name="client">The client.</param>
 /// <param name="conceptService">The concept service.</param>
 /// <param name="coreAuditService">The core audit service.</param>
 /// <param name="entityAuditService">The entity audit service.</param>
 public EntityService(ImsiServiceClient client, IConceptService conceptService, ICoreAuditService coreAuditService, IEntityAuditService entityAuditService) : base(client)
 {
     this.conceptService     = conceptService;
     this.coreAuditService   = coreAuditService;
     this.entityAuditService = entityAuditService;
 }