/// <summary> /// /// </summary> /// <param name="commonDataRepository"></param> /// <param name="accountRepository"></param> public AllRepository( ICommonDataRepository commonDataRepository, IAccountRepository accountRepository) { _commonDataRepository = commonDataRepository; _accountRepository = accountRepository; }
public CommonDataService(ICommonDataRepository repository_) { if (repository_ == null) throw new ArgumentNullException("ICommonDataRepository", "Repository is not defined."); this._repository = repository_; }
/// <summary> /// /// </summary> /// <param name="commonDataRepository"></param> /// <param name="esSettings"></param> public DeleteCommonDataConsumer( ICommonDataRepository commonDataRepository, IOptions <ElasticSearchSettings> esSettings) { _commonDataRepository = commonDataRepository; var node = new Uri($"http://{esSettings.Value.Host}:{esSettings.Value.Port}"); var connSettings = new ConnectionSettings(node); _esClient = new ElasticClient(connSettings); }
/// <summary> /// /// </summary> /// <param name="commonDataRepository"></param> /// <param name="appcontext"></param> /// <param name="httpContextAccessor"></param> /// <param name="esSettings"></param> public LeadRepository( ICommonDataRepository commonDataRepository, ApplicationDbContext appcontext, IHttpContextAccessor httpContextAccessor, IOptions <ElasticSearchSettings> esSettings) { _context = appcontext; _commonDataRepository = commonDataRepository; _httpContextAccessor = httpContextAccessor; var node = new Uri($"http://{esSettings.Value.Host}:{esSettings.Value.Port}"); var connSettings = new ConnectionSettings(node); connSettings.DefaultIndex("leads"); _esClient = new ElasticClient(connSettings); }
/// <summary> /// contructor LeadController /// </summary> /// <param name="createLeadRequestClient"></param> /// <param name="updateLeadRequestClient"></param> /// <param name="deleteLeadRequestClient"></param> /// <param name="importLeadClient"></param> /// <param name="addSupportStaffRequestClient"></param> /// <param name="removeSupportStaffRequestClient"></param> /// <param name="addStaffInChargeRequestClient"></param> /// <param name="leadRepository"></param> /// <param name="commonDataRepository"></param> public LeadController( IRequestClient <ICreateLead, LeadEdited> createLeadRequestClient, IRequestClient <IUpdateLead, LeadEdited> updateLeadRequestClient, IRequestClient <IDeleteLead, ILeadDeleted> deleteLeadRequestClient, IRequestClient <IImportLead, ILeadImported> importLeadClient, IRequestClient <IAddSupportStaff, Lead> addSupportStaffRequestClient, IRequestClient <IRemoveSupportStaff, Lead> removeSupportStaffRequestClient, IRequestClient <IAddStaffInCharge, IStaffInChargeAdded> addStaffInChargeRequestClient, ILeadRepository leadRepository, ICommonDataRepository commonDataRepository) { _createLeadRequestClient = createLeadRequestClient; _updateLeadRequestClient = updateLeadRequestClient; _deleteLeadRequestClient = deleteLeadRequestClient; _importLeadClient = importLeadClient; _addSupportStaffRequestClient = addSupportStaffRequestClient; _removeSupportStaffRequestClient = removeSupportStaffRequestClient; _addStaffInChargeRequestClient = addStaffInChargeRequestClient; _leadRepository = leadRepository; _commonDataRepository = commonDataRepository; }