Wrox Programmer Forums
|
Beginning Visual Basic 2012
This is the forum to discuss the Wrox book Beginning Visual Basic 2012 by Bryan Newsome; ISBN: 978-1-118-31181-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning Visual Basic 2012 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 22nd, 2013, 11:40 PM
Registered User
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation CH 17 Dynamic Data Website

Hi,

I have ran into trouble on ch 17 pg 576 step 10. when I go into my global.asax file and make changes to the line containing "DefaultModel.RegisterContext(GetType(pubsModel.pu bsEntities), New ContextConfiguration() With {.ScaffoldAllTables = True})" the "pubsModel.pubsEntities" errors out the error is listed below:

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

at this point I have tried doing all steps over to see if I missed something... any help would greatly apprecatied.

thanks,
JT
 
Old April 10th, 2014, 11:40 AM
Registered User
 
Join Date: Apr 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Revert back to ObjectContext Code Generation

Probably too late for this user but if anyone else gets the problem:

In Visual Studio 2012 you get DbContext code generated by default for all new models created with the EF Designer. To get this exercise working, you need to revert back to ObjectContext Code Generation.

1. Generation of the derived DbContext and POCO classes is handled by two .tt files in your project, if you expand the .edmx file in solution explorer you will see these files. You will need to select the "Nest related Files" button in Solution Explorer to see the nested files. Delete both of these files from your project.

2. Open your model in the EF Designer, right-click on a blank section of the design surface and select Properties. In the Properties window change the Code Generation Strategy to "Legacy ObjectContext".

This worked for me!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 17. Emergency Responder plagoon BOOK: Professional Android 4 Application Development 0 January 2nd, 2013 03:40 PM
Ch 17 Storing Basic User Data in the Profile - dateOfBirth Error! leeWozyWarren BOOK: Beginning ASP.NET 4 : in C# and VB 1 December 6th, 2011 06:22 PM
Ch 17 LINQ to SQL sirmilt BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 0 May 29th, 2011 05:37 PM
CH 17 - Assemblies equintana71 BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 1 May 17th, 2011 09:20 PM
Dynamic website to Static website Aboal3ood ASP.NET 1.x and 2.0 Application Design 4 December 7th, 2006 11:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.