Exemplo n.º 1
0
        public DataBaseService(ConnectionDataModel connectData)
        {
            var client = new MongoClient(connectData.ConnectionString);

            Database   = client.GetDatabase(connectData.DataBaseName);
            Collection = Database.GetCollection <MediaFileModel>(connectData.CollectionName);
        }
Exemplo n.º 2
0
        public ConnectionDataModel GetConnectionTypes()
        {
            IMasterTablesDataAccess _repository = new MasterTablesDataAccess();
            ConnectionDataModel     response    = new ConnectionDataModel();

            response.connectionTypes = _repository.GetConnectionTypeList();
            return(response);
        }
Exemplo n.º 3
0
        public void GeminiService_NewConnection_Test()
        {
            Exception       testexception = null;
            IGeminiService  geminiservice = new GeminiService(new EventAggregator(), new GeneralDataModel());
            IConnectionData testdata      = new ConnectionDataModel();

            testdata.URL = defaultpath;
            // Try Default-Connecton with Windows-Authentication
            try { geminiservice.NewConnection(testdata); }
            catch (Exception e) { testexception = e; }
            // Check if an Exeption was thrown by "NewConnection"
            Assert.IsNull(testexception);
        }