Пример #1
0
 protected override void OnModelCreating(ModelBuilder modelBuilder)
 {
     base.OnModelCreating(modelBuilder);
     ArticleMapping.Map(modelBuilder.Entity <Article>());
     TagMapping.Map(modelBuilder.Entity <Tag>());
     ArticleTagMapping.Map(modelBuilder.Entity <ArticleTag>());
 }
Пример #2
0
        protected override void OnModelCreating(ModelBuilder builder)
        {
            base.OnModelCreating(builder);
            builder.HasDefaultSchema("MainDb");

            ApplicationUserMapping.Map(builder.Entity <ApplicationUser>());
            ArticleArticleTagMapping.Map(builder.Entity <ArticleArticleTag>());
            ArticleCommentMapping.Map(builder.Entity <ArticleComment>());
            ArticleMapping.Map(builder.Entity <Article>());
            ArticleRatingMapping.Map(builder.Entity <ArticleRating>());
            ArticleTagMapping.Map(builder.Entity <ArticleTag>());
            ContactMapping.Map(builder.Entity <Contact>());
            PortfolioMapping.Map(builder.Entity <Portfolio>());
            SiteOrderMapping.Map(builder.Entity <SiteOrder>());
            SlideShowMapping.Map(builder.Entity <SlideShow>());
        }