Beispiel #1
0
        public static void ConfigureCmsKit(
            this IMongoModelBuilder builder,
            Action <AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
        {
            Check.NotNull(builder, nameof(builder));

            var options = new CmsKitMongoModelBuilderConfigurationOptions(
                CmsKitDbProperties.DbTablePrefix
                );

            optionsAction?.Invoke(options);

            builder.Entity <CmsUser>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Users";
            });

            builder.Entity <UserReaction>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "UserReactions";
            });

            builder.Entity <Comment>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Comments";
            });
        }
        public static void ConfigureCmsKit(
            this IMongoModelBuilder builder,
            Action <AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
        {
            Check.NotNull(builder, nameof(builder));

            var options = new CmsKitMongoModelBuilderConfigurationOptions(
                CmsKitDbProperties.DbTablePrefix
                );

            optionsAction?.Invoke(options);
        }
        public static void ConfigureCmsKit(
            this IMongoModelBuilder builder,
            Action <AbpMongoModelBuilderConfigurationOptions> optionsAction = null)
        {
            Check.NotNull(builder, nameof(builder));

            var options = new CmsKitMongoModelBuilderConfigurationOptions(
                CmsKitDbProperties.DbTablePrefix
                );

            optionsAction?.Invoke(options);

            builder.Entity <CmsUser>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Users";
            });

            builder.Entity <UserReaction>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "UserReactions";
            });

            builder.Entity <Comment>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Comments";
            });

            builder.Entity <Rating>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Ratings";
            });

            builder.Entity <Content>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Contents";
            });

            builder.Entity <Tag>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Tags";
            });

            builder.Entity <EntityTag>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "EntityTags";
            });

            builder.Entity <Page>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Pages";
            });

            builder.Entity <Blog>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "Blogs";
            });

            builder.Entity <BlogPost>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "BlogPosts";
            });

            builder.Entity <MediaDescriptor>(x =>
            {
                x.CollectionName = CmsKitDbProperties.DbTablePrefix + "MediaDescriptors";
            });
        }