/// <summary> /// Initializes a new instance of the <see cref="UnitOfWork" /> class. /// </summary> /// <param name="customerContext">The customer context.</param> public UnitOfWork(ICareElementContext customerContext) { this.customerContext = customerContext; this.dbContext = new HealthLibraryServiceDbContext( GetConnectionString(customerContext.CustomerId)); }
/// <summary> /// Initializes a new instance of the <see cref="QuestionElementService"/> class. /// </summary> /// <param name="unitOfWork">The unit of work.</param> /// <param name="careElementContext">The care element context.</param> public QuestionElementService(IUnitOfWork unitOfWork, ICareElementContext careElementContext) { this.careElementContext = careElementContext; this.unitOfWork = unitOfWork; this.questionElementRepository = this.unitOfWork.CreateGenericRepository <QuestionElement>(); this.answerSetRepository = this.unitOfWork.CreateGenericRepository <AnswerSet>(); this.questionElementScaleAnswerChoiceRepository = this.unitOfWork.CreateGenericRepository <QuestionElementToScaleAnswerChoice>(); }
/// <summary> /// Initializes a new instance of the <see cref="ProtocolService" /> class. /// </summary> /// <param name="unitOfWork">The unit of work.</param> /// <param name="careElementContext">The care element context.</param> public ProtocolService( IUnitOfWork unitOfWork, ICareElementContext careElementContext ) { this.unitOfWork = unitOfWork; this.elementRepository = this.unitOfWork.CreateGenericRepository <Element>(); this.protocolRepository = this.unitOfWork.CreateGenericRepository <Protocol>(); this.protocolElementRepository = this.unitOfWork.CreateGenericRepository <ProtocolElement>(); this.branchRepository = this.unitOfWork.CreateGenericRepository <Branch>(); this.alertRepository = this.unitOfWork.CreateGenericRepository <Alert>(); this.conditionRepository = this.unitOfWork.CreateGenericRepository <Condition>(); this.careElementContext = careElementContext; }
/// <summary> /// Initializes a new instance of the <see cref="ScaleAnswerSetControllerHelper" /> class. /// </summary> /// <param name="scaleAnswerSetService">The scale answer set service.</param> /// <param name="careElementContext">The care element context.</param> /// <param name="tagsService">The tags service.</param> /// <param name="globalSearchCacheHelper">The global search cache helper.</param> /// <param name="tagsSearchCacheHelper">The tags search cache helper.</param> /// <param name="mediaFileHelper">The audio file helper.</param> public ScaleAnswerSetControllerHelper(IScaleAnswerSetService scaleAnswerSetService, ICareElementContext careElementContext, ITagsService tagsService, IGlobalSearchCacheHelper globalSearchCacheHelper, ITagsSearchCacheHelper tagsSearchCacheHelper, IMediaFileHelper mediaFileHelper ) { this.scaleAnswerSetService = scaleAnswerSetService; this.careElementContext = careElementContext; this.tagsService = tagsService; this.globalSearchCacheHelper = globalSearchCacheHelper; this.tagsSearchCacheHelper = tagsSearchCacheHelper; this.mediaFileHelper = mediaFileHelper; }
/// <summary> /// Initializes a new instance of the <see cref="ProtocolsControllerHelper" /> class. /// </summary> /// <param name="protocolService">The protocol service.</param> /// <param name="tagsService">The tags service.</param> /// <param name="careElementContext">The care element context.</param> /// <param name="globalSearchCacheHelper">The global search cache helper.</param> /// <param name="tagsSearchCacheHelper">The tags search cache helper.</param> public ProtocolsControllerHelper( IProtocolService protocolService, ITagsService tagsService, ICareElementContext careElementContext, IGlobalSearchCacheHelper globalSearchCacheHelper, ITagsSearchCacheHelper tagsSearchCacheHelper ) { this.protocolService = protocolService; this.tagsService = tagsService; this.careElementContext = careElementContext; this.globalSearchCacheHelper = globalSearchCacheHelper; this.tagsSearchCacheHelper = tagsSearchCacheHelper; }
/// <summary> /// Initializes a new instance of the <see cref="QuestionElementControllerHelper" /> class. /// </summary> /// <param name="questionElementService">The question element service.</param> /// <param name="careElementContext">The care element context.</param> /// <param name="tagsService">The tags service.</param> /// <param name="globalSearchCacheHelper">The global search cache helper.</param> /// <param name="tagsSearchCacheHelper">The tags search cache helper.</param> /// <param name="mediaFileHelper">The audio file helper.</param> public QuestionElementControllerHelper( IQuestionElementService questionElementService, ICareElementContext careElementContext, ITagsService tagsService, IGlobalSearchCacheHelper globalSearchCacheHelper, ITagsSearchCacheHelper tagsSearchCacheHelper, IMediaFileHelper mediaFileHelper ) { this.tagsService = tagsService; this.questionElementService = questionElementService; this.careElementContext = careElementContext; this.globalSearchCacheHelper = globalSearchCacheHelper; this.tagsSearchCacheHelper = tagsSearchCacheHelper; this.mediaFileHelper = mediaFileHelper; }
/// <summary> /// Initializes a new instance of the <see cref="SelectionAnswerSetsControllerHelper" /> class. /// </summary> /// <param name="selectionAnswerSetService">The selection answer set service.</param> /// <param name="careElementContext">The care element context.</param> /// <param name="contentStorage">The content storage.</param> /// <param name="globalSearchCacheHelper">The global search cache helper.</param> /// <param name="tagsSearchCacheHelper">The tags search cache helper.</param> /// <param name="tagsService">The tags service.</param> /// <param name="mediaFileHelper">The audio file helper.</param> public SelectionAnswerSetsControllerHelper( ISelectionAnswerSetService selectionAnswerSetService, ICareElementContext careElementContext, IContentStorage contentStorage, IGlobalSearchCacheHelper globalSearchCacheHelper, ITagsSearchCacheHelper tagsSearchCacheHelper, ITagsService tagsService, IMediaFileHelper mediaFileHelper ) { this.selectionAnswerSetService = selectionAnswerSetService; this.careElementContext = careElementContext; this.contentStorage = contentStorage; this.globalSearchCacheHelper = globalSearchCacheHelper; this.tagsSearchCacheHelper = tagsSearchCacheHelper; this.tagsService = tagsService; this.mediaFileHelper = mediaFileHelper; }