コード例 #1
0
        public DataBaseFacade(SimpleMongoClient mongoClient)
        {
            if (mongoClient == null)
            {
                throw new ArgumentNullException(nameof(mongoClient));
            }

            this.mongoClient = mongoClient.Db;

            var pack = new ConventionPack
            {
                new CamelCaseElementNameConvention()
            };

            ConventionRegistry.Register("camel case", pack, t => true);
        }
コード例 #2
0
ファイル: Bootstrap.cs プロジェクト: MarceloSabris/DDD
 private void RegisterInfrastructure()
 {
     _factory.Register(SimpleMongoClient.CreateFromConfig("mongoclient-", _appSettings));
     _factory.Register <IDataBaseFacade>(new DataBaseFacade(_factory.Create <SimpleMongoClient>()));
 }