Trying to customize scaffolding in VS2010 VB Web Site
Posted on 2011-10-22
I'm going through the motions of putting together a (VB) ASP.Net Web Site (not Application) using Dynamic Data template.
The good news, it works out of the box.
The bad news, in the literature I'm reading about customizing the tables by building partial classes--that part is not working.
The problem seems to be that I can't see the 'real' classes that supposedly were built. So I have a Master table (which MS ever so cutely decides to pluralize to Masters, which doesn't make sense but whatever) and there is no Master.vb or Masters.vb that I can find. I created my own partial class, using the metadatatype and scaffolding attributes exactly as described in both the book I'm using and various websites with examples.
I tried naming the partial class both "Master" and "Masters" (thanks for the confusion, MS) maybe I should try "MyMasters"? Anyway...
If I set the global scaffolding thing to false, I just get the (expected) error that there are no tables to create, if I set it to True, I get the data just fine, but my Partial class changes are totally ignored.
So I guess the main question is, where is the main class for the "Master" table (or Masters)? I had to add the App_Code folder manually, which I thought was odd (isn't that a pretty standard folder?). I refreshed,
Thanks for any help,