protected override void OnModelCreating(ModelBuilder modelBuilder) { var builder = modelBuilder.As<ForumContext>(); builder.Entry(f => f.Announcement).MapTo("annt"); builder.EntrySet(f => f.Discussions, disb => { disb.MapTo("dscs") .Identifier(d => d.ID) .EntryItem(db => { db.SubEntry(d => d.Title); db.SubEntry(d => d.Author); db.SubEntry(d => d.AuthorID); db.SubEntry(d => d.CountViews); db.SubEntry(d => d.CountFollows); db.SubEntry(d => d.CountComments); }); }); builder.EntrySet(f => f.Comments, dsb => { dsb.MapTo("cmts"); dsb.EntryItem(db => { }); }); }