public static ICohortRepository <T> GetCohortRepository(string dbName, string productName, string userId)
        {
            ICohortRepository <T> repo = null;

            //We only have 1 repository at this time, just return it
            repo        = new MongoCohortRepository <T>(dbName) as ICohortRepository <T>;
            repo.UserId = userId;
            return(repo);
        }
Example #2
0
        public static GetCohortDataResponse GetCohortByID(GetCohortDataRequest request)
        {
            GetCohortDataResponse response = new GetCohortDataResponse();

            ICohortRepository <GetCohortDataResponse> repo = CohortRepositoryFactory <GetCohortDataResponse> .GetCohortRepository(request.ContractNumber, request.Context, request.UserId);

            response = repo.FindByID(request.CohortID) as GetCohortDataResponse;

            return(response);
        }
Example #3
0
 public ModuleEventsDeserializer(ICohortRepository cohortRepository,
                                 IModuleRepository moduleRepository,
                                 IStudiefaseService studiefaseService,
                                 ICompetentieService competentieService,
                                 IEindeisService eindeisService,
                                 IAuditLogEntryRepository auditLogRepository)
 {
     _cohortRepository   = cohortRepository;
     _moduleRepository   = moduleRepository;
     _studiefaseService  = studiefaseService;
     _competentieService = competentieService;
     _eindeisService     = eindeisService;
     _auditLogRepository = auditLogRepository;
 }
Example #4
0
        public static GetAllCohortsDataResponse GetCohorts(GetAllCohortsDataRequest request)
        {
            GetAllCohortsDataResponse response = new GetAllCohortsDataResponse();

            ICohortRepository <API.DataDomain.Cohort.DTO.CohortData> repo = CohortRepositoryFactory <API.DataDomain.Cohort.DTO.CohortData> .GetCohortRepository(request.ContractNumber, request.Context, request.UserId);

            List <API.DataDomain.Cohort.DTO.CohortData> cohorts = repo.SelectAll() as List <API.DataDomain.Cohort.DTO.CohortData>;

            if (cohorts != null)
            {
                response.Cohorts = cohorts.ToList();
            }
            return(response);
        }
 public CohortsController(ICohortRepository cohortRepository)
 {
     this.cohortRepository = cohortRepository;
 }
Example #6
0
        public void GetCohortByID()
        {
            ICohortRepository <GetCohortDataResponse> repo = CohortRepositoryFactory <GetCohortDataResponse> .GetCohortRepository("InHealth001", "NG", "");

            repo.Select(new Interface.APIExpression());
        }
Example #7
0
 public CohortsController(ICohortRepository cohortRepository)
 {
     this.cohortRepository = cohortRepository;
 }
Example #8
0
 public CohortService(ICohortRepository cohortRepository)
 {
     _cohortRepository = cohortRepository;
 }
 public ExperimentsController(IExperimentRepository experimentRepository, ICohortRepository cohortRepository, IGoalRepository goalRepository)
 {
     this.experimentRepository = experimentRepository;
     this.cohortRepository = cohortRepository;
     this.goalRepository = goalRepository;
 }
Example #10
0
 public ExperimentsController(IExperimentRepository experimentRepository, ICohortRepository cohortRepository, IGoalRepository goalRepository)
 {
     this.experimentRepository = experimentRepository;
     this.cohortRepository     = cohortRepository;
     this.goalRepository       = goalRepository;
 }