Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : 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, 07:54 PM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default Chapter 14 PlanetWrox.edmx

I have been working through the beginners book and have come across a problem that I can't get past.

I am using VS2013 for this entire project.

Within the "Try it Out" on pages 501 and 502 I don't get the ability to change the Code generation strategy property from None to default in step 7. The property is disabled and set to "T4".

Subsequently if I delete the *.tt files as pointed out in step 8, I can't reference PlanetWroxModel at all in step 10 with the Imports statement.

Regards

Kim
 
Old January 30th, 2014, 04:53 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Kim,

You may want to take a look here where Alan asked the same question: Ch 14 generating entity model

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
 
Old January 30th, 2014, 10:36 PM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Thanks again for the quick reply.

I selected the entity framework version 6.0, unlike Alan. However I don't have the option to select other than "T4" in the code generation strategy property. This property is disabled.

How can I select entity framework 5.0, since I selected the "Don't show option" in step 4.

Regards

Kim
 
Old January 31st, 2014, 05:10 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Kim,

>>How can I select entity framework 5.0, since I selected the "Don't show option" in step 4.

Not sure which option you're referring to. When I add an EDMX, I can choose between 5 and 6, but I see no checkbox to never ask the version again. Or do you mean the option about suppressing the security warning?

I think if you uninstall the EntityFramework (using the Package Manager Console with the command Uninstall-Packge EntityFramework) you should be able to add an EDMX again and pick version 5.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
The Following User Says Thank You to Imar For This Useful Post:
Datagaard (February 24th, 2014)
 
Old February 24th, 2014, 12:33 AM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks Imar,

Just some additional notes, in version 2013 of VS for EDMX, the PlanteWroxEntities namespace must be different from the Entity Container name (Used PlanetWroxModel), and the Code Generation strategy has to be set to 'Legacy ObjectContext'.

Thus the imports for VB code is set to 'PlanetWroxModel' now all works fine.

Guess it must be difficult to continue to update your book for each version of VS if it changes each year.

Thanks Again
 
Old February 24th, 2014, 04:49 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> Guess it must be difficult to continue to update your book for each version of VS if it changes each year.

The hardest part is supporting people that use non-matching versions of the book and VS, as sometimes it's hard to see what they do.

I just finished an update of my book for VS 2013 and ASP.NET 4.5.1. where all this gets addressed "the proper" way. No legacy context, targeting EF 6 and using Model Binding instead of the more or less obsolete Entity Data Source control.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
The Following User Says Thank You to Imar For This Useful Post:
Datagaard (February 24th, 2014)
 
Old February 24th, 2014, 06:37 PM
Registered User
 
Join Date: Jan 2014
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Would you be able to keep me informed as to when your update to your book will be available.

Kim
 
Old February 24th, 2014, 07:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Kim,

Amazon says March 24, which is probably accurate: http://www.amazon.com/Beginning-ASP-...rds=spaanjaars

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
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!
The Following User Says Thank You to Imar For This Useful Post:
Datagaard (February 24th, 2014)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Default values not mapping into edmx file sophia BOOK: Beginning ASP.NET 4 : in C# and VB 6 December 18th, 2011 01:19 PM
Chapter 12 Can't access PlanetWrox.mdf jkoyle BOOK: Beginning ASP.NET 4 : in C# and VB 4 July 2nd, 2011 04:06 PM
Chapter 14, first 'Try It Out' alharlow BOOK: Beginning ASP.NET 4 : in C# and VB 5 March 18th, 2011 05:00 AM
edmx ClarkNaylor BOOK: Beginning ASP.NET 4 : in C# and VB 2 June 29th, 2010 01:20 PM
EDMX arivarasuk ASP.NET 3.5 Professionals 6 January 30th, 2009 10:30 AM





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