Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

Dynamic Data Website help?

$
0
0

Hi,

 

I am currently working through a book by wrox called Beg Visual Basic 2012 and one of the last chapters has to do with Dynamic Data Website and asp.net. while working through one of the examples I have ran into problems. the example is to create a basic dynamic data website so I created new website selecting the "ASP.net dynamic data entities web site"  then using the "Entity Data Model wizard" I choose to generate from database. Selecting pubs.mdf database from the MS SQL server 2012 database examples. Once I completed the wizard the book has me view the Global.asax file and change a line called "DefaultModel.RegisterContext" and more specifically change "RegisterRoutes" default method to "pubsModel.pubsEntities".  The full line is featured below.

"DefaultModel.RegisterContext(GetType(pubsModel.pubsEntities), New ContextConfiguration() With {.ScaffoldAllTables = True})"

 

Once I type in "pubsModel.pubsEntities" the method is underline as an error. I have pasted the full error below. Also a three message are displayed within the error list which is also pasted below.

 

Error list:

 

"Error 6 Type 'pubsModel.pubsEntities' is not defined. C:\Users\NVSYS\Documents\Visual Studio 2012\Projects\dda\Global.asax 25 46 dda"

 

"Message 1 The table/view 'C:\USERS\NVSYS\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\DDA\APP_DATA\PUBS.MDF.dbo.discounts' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view. C:\Users\NVSYS\Documents\Visual Studio 2012\Projects\dda\App_Code\Model.edmx 0 1 dda"

 

I have tried redoing the example a couple of times to make sure I did not miss a step. At this point I don’t know what to do since I am very need to ASP.net and dynamic data website topics. Any help would be greatly appreciated!

 

Thanks,

JT


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>