I’ve created a DBML file, and dragged my tables onto the designer. On my pages, my editor form displays a field for the primary key for my entities.
Is there a way to add a ScaffoldColumn attribute to my primary key column for a table in the DBML designer?
Yes, you’ll just loose the ability to have linq-to-sql auto generate the classes.
However MVC works a lot better with ViewModels, small DTO like classes which contain just what the view needs. Using database and persistence classes in your Views is considered bad form because it tightly couples your entire application together.