 |
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
|
|
|
|
|

April 11th, 2015, 07:16 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

April 12th, 2015, 09:27 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

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

April 12th, 2015, 10:39 AM
|
|
Registered User
|
|
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

April 12th, 2015, 11:25 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
>> 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
|
|

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

April 12th, 2015, 04:09 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
|

April 12th, 2015, 04:42 PM
|
|
Registered User
|
|
Join Date: Apr 2015
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hello,
No problem. I'll finish this and look another book.
Cheers,
PSK
|
|
 |
|