示例#1
0
 public DbRepository(IOptions <DbOptions> options)
 {
     this.client         = new MongoClient(CryptorEngine.Decrypt256(options.Value.ConnectionString));
     this.database       = this.client.GetDatabase(CryptorEngine.Decrypt256(options.Value.Database));
     this.lazyCollection = new Lazy <IMongoCollection <TEntity> >(() => this.CreateCollectionFactory());
 }