Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="options"></param>
        public MongoContext(MongoDbContextOptions options)
        {
            this.options = options;

            client   = new MongoClient(options.ConnectionString);
            Database = GetDatabase(options);
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="options"></param>
 /// <returns></returns>
 private IMongoDatabase GetDatabase(MongoDbContextOptions options)
 {
     return(client.GetDatabase(DatabaseName, options.Settings));
 }