Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4.5 > BOOK: Beginning ASP.NET 4.5 : in C# and VB
|
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 April 11th, 2015, 07:16 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Looks like EF isn't setup correctly, or is still using version 6.

Can you zip the site folder and make it available online somewhere? Then I'll take a look and figure out what's going on.

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 April 11th, 2015, 09:18 AM
PSK PSK is offline
Registered User
 
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Thanks for the quick reply.

I have added a link to the work.

To recap, this work is okay up to the end of chapter 13, but I am stuck on the first 'Try it out' on chapter 14.


My work

I will try to work through as best as I can, by ensuring EF 6 is fully uninstalled. I'll hunt for some clues, online.


Thanks

PSK
 
Old April 12th, 2015, 09:27 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 there,

I downloaded your site and I can make it work using EF 5 with the steps from this post: Your Book and VS Versions

Did you try those out?

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 April 12th, 2015, 09:44 AM
PSK PSK is offline
Registered User
 
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Thanks for the super quick reply, really appreciated.

I assume you're referring to this step.

Quote:
1. Drop back to EF 5. In order to do this, delete the .edmx and .tt files from the App_Code folder, delete the EF assemblies from the Bin folder, and remove the references to EF from web.config. Then rebuild the site, add a new ADO.NET Entity Model and choose version 5 in the Choose Your Version dialog. Then delete the .tt files from the App_Code folder, open the EDMX diagam, right-click an empty spot and on the Properties Grid set Code Generation Strategy to Legacy ObjectContext. Then rebuild again, and it should work.
I did try this, but I wouldn't work. perhaps I'm doing something wrong.

When I try to correct the error, in my Visual Studio, I don't get the option you highlight in your book - the option when you right click the red squiggles and to select 'Using PlanetWroxModel;' - see links, below.

Red Squiggles

Error message in browser

I guess I'll have to try again.

Thanks for your help,

PSK
 
Old April 12th, 2015, 10:39 AM
PSK PSK is offline
Registered User
 
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Imar,

It has worked!

Firstly, a huge apology for what feels like a complete waste of your time - truly sorry. It was my error. You were right your solution did work, and it was in fact my sloppiness in not reading the most important part of the answer. I didn't set the Code Generation Strategy to Legacy ObjectContext. I'm not sure how I missed it, but miss it I did. Again really sorry for this error and for wasting your time.

Thank you for everything, I genuinely appreciate you taking time out to look at the issue.

I spotted your new Beginning ASP.NET 4.5.1: in C# and VB book, and wondered if it is an idea to have a look at that once I finish this book. Are there many differences from this book?

Thanks again
 
Old April 12th, 2015, 11:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

>> I didn't set the Code Generation Strategy to Legacy ObjectContext.

Ah, yes, that makes sense. That changes how EF generates code and determines if PlanetWroxModel exists or not.

>> I spotted your new Beginning ASP.NET 4.5.1: in C# and VB book, and wondered if it is an idea to have a look at that once I finish this book. Are there many differences from this book?

There are a lot of similarities with the book you have. It does, however, focus on the latest version of Visual Studio and Entity Framework so there are many differences (small and large) as well. You could try downloading the source code for the new book and then experiment with the latest version of Visual Studio and that source code.

In general, although I would love to sell another copy of my book, I'd sa that if you own the 4.5 version of the book, you should be able to pick up the new stuff in VS 2013 without getting the 4.5.1 edition of the book.

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 April 12th, 2015, 11:47 AM
PSK PSK is offline
Registered User
 
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Thanks for the info. In truth, I don't think I'm good enough to experiment - I still feel so far behind and need to catch up / gain confidence with what I'm currently doing.

I'll continue with this book and once done, probably look at working through a begginers book on C# or MVC - any book suggestions would be welcome.

Thanks once again

Regards,
PSK
 
Old April 12th, 2015, 04:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Wrox and Apress have some pretty good MVC books. However, they are not for beginners. I don't have any beginners titles to recommend for MVC unfortunately.

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 April 12th, 2015, 04:42 PM
PSK PSK is offline
Registered User
 
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

No problem. I'll finish this and look another book.

Cheers,

PSK





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 - operating system error 5: "5(access is denied.)" for Planet Wrox DB [email protected] BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 4 March 28th, 2015 07:02 PM
PLEASE HELP WITH THE ERROR IN Chapter 14 LINQ and the ADO.NET Entity Framework Tobi BOOK: Beginning ASP.NET 4 : in C# and VB 2 February 19th, 2014 08:03 AM
Chapter 14 - Using Data Controls with the Entity Framework nudirection BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 July 11th, 2013 02:29 AM
Chapter 14 Linq and ado.net entity framework pandukal21 BOOK: Beginning ASP.NET 4 : in C# and VB 8 January 28th, 2011 05:19 AM
Wrox United - chapter 14 - error SqlDependency tom_10000001 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 November 10th, 2006 06:22 AM





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