Wrox Programmer Forums
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 29th, 2014, 10:41 PM
Authorized User
Join Date: Nov 2013
Posts: 84
Thanks: 29
Thanked 2 Times in 2 Posts
Default Ch 14 generating entity model

Hi Imar,

I was able to properly generate the PlanetWroxModel in PlanetWrox.Designer.vb, but it didn't come up right away. There were several differences in my system from the text, which I would expect given I am using Visual Studio 2013. Please comment on the following:

This is from the 1st Try it out in Ch 14.

I was given a choice to select EF 5.0 or 6.0 after Figure 14.1 (step 3). I selected 5.0 because it seems like from the various conversations on the web that 6.0 is a little new.

In step 6 the text says to change the 'Entity Set Names' from singular to plural. But there are 2 properties, 'Entity Set Name' and 'Name'. The 'Entity Set Name' properties were Genres1 and Reviews1 respectively. So I wasn't sure if in Visual Studio 2013 we needed to change the 'Entity Set Name' or the 'Name'. I changed the 'Name' property. Do I need to change it around?

Finally, in step 7 the text says to change the Code Generation Strategy from None to Default. Visual Studio 2013 has neither of those; it has T4 and 'Legacy ObjectContext'. I selected T4 and the system didn't generate anything in PlanetWrox.Designer.vb. Therefore my 'Using PlanetWroxModel' statement wasn't accepted in all.aspx.vb. So I tried the 'Legacy ObjectContext' and it generated the Namespace just fine.

I think I can proceed. But I'd like your input if you're able. Thanks,

Best Regards,
The Following User Says Thank You to AlanWheeler For This Useful Post:
Ansieone (June 4th, 2014)
Old January 30th, 2014, 04:51 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi Alan,

Not sure why the sets have the 1 in their name, but what you described sounds good. Legacy ObjectContext is indeed the option to choose to mimic the 2012 behavior.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Last edited by Imar; February 23rd, 2014 at 03:28 PM..
Old April 30th, 2014, 07:51 AM
Registered User
Join Date: Apr 2014
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Default Entity Framework in VS 2013

Thanks, Alan. Picking EF 5.0 was an inspired choice! I chose the default EF 6.0 and encountered the same problem: namespace PlanetWroxModel not visible to Code Behind file (All.aspx.cs, p. 503). In 6.0 this error is fatal because T4 is the only available Code Generation Strategy!
The Following User Says Thank You to ploddingaussie For This Useful Post:
Ansieone (June 4th, 2014)

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem creating entity data model Kourosh94 ASP.NET 4.5 General Discussion 0 December 7th, 2013 03:56 PM
Chapter 14 : Mapping data model to an object model robochrish BOOK: Beginning ASP.NET 4 : in C# and VB 8 March 5th, 2013 09:52 AM
Chapter 14: Entity Model Code WILL NOT WORK! pittfurg BOOK: Beginning ASP.NET 4 : in C# and VB 6 February 28th, 2013 07:48 AM
Trouble Creating Entity Framework Model floridaguy BOOK: Beginning ASP.NET 4 : in C# and VB 4 November 16th, 2011 02:56 PM
Chapter 14 - ADO.NET Entity Data Model Sean1980 BOOK: Beginning ASP.NET 4 : in C# and VB 3 July 15th, 2011 12:24 PM

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