예제 #1
0
        public ConfigurationService(string connectionString, string database, Guid platformIdentifier) : base(connectionString, database, platformIdentifier)
        {
            BsonClassMapExtended.RegisterClassMap <Login>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <LoginContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });

            _context = new ConfigurationContext(_mongoDb);
        }
예제 #2
0
        public OrderCaptureService(string connectionString, string database, Guid platformIdentifier) : base(connectionString, database, platformIdentifier)
        {
            #region BsonMaps

            BsonClassMapExtended.RegisterClassMap <Order>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <OrderContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <Shopper>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <ShopperContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <Cart>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <CartContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });

            #endregion BsonMaps

            _context = new OrderCaptureContext(_mongoDb);
        }
예제 #3
0
        public MembershipService(string connectionString, string database, Guid platformIdentifier) : base(connectionString, database, platformIdentifier)
        {
            #region BsonMaps

            BsonClassMapExtended.RegisterClassMap <User>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <UserContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <Account>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <AccountContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <AccountMaster>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <AccountMasterContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <Contact>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <ContactContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <Address>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <AddressContent>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });
            BsonClassMapExtended.RegisterClassMap <Owner>(cm =>
            {
                cm.AutoMap();
                cm.SetIgnoreExtraElements(true);
            });

            #endregion BsonMaps

            _context = new MembershipContext(_mongoDb);
        }