Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1034453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:23:40+00:00 2026-05-16T14:23:40+00:00

I combined MVC and DD by creating a new DD project and adding the

  • 0

I combined MVC and DD by creating a new DD project and adding the MVC stuff (references, routing, usings, etc).

The list of tables on default.aspx (from DD) will show all tables, including the ones with [ScaffoldTable(false)]. The URL’s of the tables with Scaffold==true have the expected form (DD/TableName/List.aspx). However, the URL’s of the tables that should not be shown are in the form /Home/List?Table=TableName.

If you leave out the MVC routing (Routes.MapRoute) then the tables with Scaffold(false) are not shown. Or you can leave out only the Parameter defaults.

My guess is that Dynamic Data determines if a table is visible by checking to see if a route can be made to for the List page. The DynamicDataRoute will not match because that will not generate a route if Scaffold==false. BUT THEN the MVC Route WILL match because of the Parameter defaults at the end.

Am I correct and is this a bug or am I completely missing something here?

EDIT:
I fixed it by adding filtering the VisibleTables on Scaffold like this, but that’s a workaround…

System.Collections.IList visibleTables = 
   MvcApplication.DefaultModel.VisibleTables.Where(o=>o.Scaffold==true).ToList();

My RegisterRoutes in global.asax.cs:

    public static void RegisterRoutes(RouteCollection routes)
    {
        DefaultModel.RegisterContext(typeof(studiebase2Entities), new ContextConfiguration() { ScaffoldAllTables = false });

        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

        routes.Add(new DynamicDataRoute("DD/{table}/{action}.aspx")
        {
            Constraints = new RouteValueDictionary(new { action = "List|Details|Edit|Insert" }),
            Model = DefaultModel
        });

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
        );

    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:23:41+00:00Added an answer on May 16, 2026 at 2:23 pm

    A somewhat cleaner fix would be to add a constraint to your MVC route so that it doesn’t match when a ‘Table’ is specified. e.g. something like:

        routes.MapRoute(
            "Default", // Route name
            "{controller}/{action}/{id}", // URL with parameters
            new { controller = "Home", action = "Index", id = UrlParameter.Optional },
            new { Table = "" }
        );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have anyone successfully managed to setup a combined Java/C++ project for Eclipse? What I
Using jQuery UI 1.8rc3 combined with the new jquery.effects.fade.js code, I've been able to
The Dutch and German language do have words that can be combined to new
I recently published my first MVC 2 project to a commercial web server, running
I am working on an ASP.NET MVC project which allows users to construct arbitrarily
If I start a new ASP.NET MVC 3 Web Application with a Internet Application
In an asp.net mvc 3 project, i'm using Combres to combine and minify my
I am working with DotNet.Highcharts in Visual Studio 2010. I am creating a MVC
Using ASP.Net Forms and ASP.Net MVC 3 (combined - we are in process of
I am creating a new website that needs to work in desktop browsers as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.