Пример #1
0
        public static void ConfigureEShop(
            this IMongoModelBuilder builder,
            Action <AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
        {
            Check.NotNull(builder, nameof(builder));

            var options = new EShopMongoModelBuilderConfigurationOptions(
                EShopDbProperties.DbTablePrefix
                );

            optionsAction?.Invoke(options);

            builder.ConfigureEShopBaskets();
            builder.ConfigureEShopOrders();
            builder.ConfigureEShopPayments();
            builder.ConfigureEShopProducts();
            builder.ConfigureEShopStores();
        }
Пример #2
0
        /* Add mongo collections here. Example:
         * public IMongoCollection<Question> Questions => Collection<Question>();
         */

        protected override void CreateModel(IMongoModelBuilder modelBuilder)
        {
            base.CreateModel(modelBuilder);

            modelBuilder.ConfigureEShopBaskets();
        }