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

            //We only have 1 repository at this time, just return it
            repo        = new MongoModuleRepository <T>(dbName) as IModuleRepository <T>;
            repo.UserId = userId;
            return(repo);
        }
Exemple #2
0
        public static GetAllModulesResponse GetModuleList(GetAllModulesRequest request)
        {
            GetAllModulesResponse result = new GetAllModulesResponse();

            MongoModuleRepository <GetAllModulesResponse> repo = new MongoModuleRepository <GetAllModulesResponse>(request.ContractNumber);

            repo.UserId = request.UserId;

            result = repo.SelectAll(request.Version, Status.Active);

            return(result);
        }