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); }
private void RegisterInfrastructure() { _factory.Register(SimpleMongoClient.CreateFromConfig("mongoclient-", _appSettings)); _factory.Register <IDataBaseFacade>(new DataBaseFacade(_factory.Create <SimpleMongoClient>())); }