public static void SetupIndexes() { BuildRepository b = new BuildRepository(); #pragma warning disable 4014 b.SetupIndexes(); #pragma warning restore 4014 }
public MetaItem() { _dbClient = new MongoClient(new MongoClientSettings { Server = new MongoServerAddress(MongoConfig.Host, MongoConfig.Port) }); _metaCollection = _dbClient.GetDatabase(MongoConfig.Database).GetCollection <MetaItemModel>(_metaCollectionName); bModel = new BuildRepository(); }
public MetaItem() { var settings = new MongoClientSettings { Server = new MongoServerAddress(MongoConfig.Host, MongoConfig.Port) }; if (!string.IsNullOrEmpty(MongoConfig.Username) && !string.IsNullOrEmpty(MongoConfig.Password)) { settings.Credential = MongoCredential.CreateCredential(MongoConfig.Database, MongoConfig.Username, MongoConfig.Password); } var dbClient = new MongoClient(settings); _metaCollection = dbClient.GetDatabase(MongoConfig.Database) .GetCollection <MetaItemModel>(META_COLLECTION_NAME); _bModel = new BuildRepository(); }
public static void SetupIndexes() { BuildRepository b = new BuildRepository(); b.SetupIndexes(); }