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 February 23rd, 2014, 07:22 AM
Registered User
 
Join Date: Feb 2014
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default LINQ to Entities error

I'm currently using VS 2013 Express edition and SQL Server 2013 Express edition which I downloaded from official Microsoft website.

Well, here is my problem:

Everything was going fine till 14th chapter. But I came across this problem in 14th chapter first try it out section which was "A Simple LINQ to Entities Example" where I stumbled across this error which you mentioned in the book:

using (PlanetWroxEntities myEntities = new PlanetWroxEntities())

where PlanetWroxEntities is shown as error since it is defined in a namespace but not in the scope. And the ways to correct the error that you mentioned in the book is not working for me when I click or ctrl+dot I see no suggestions and the only suggestion i get is 'generate a class for PlanetWroxEntites'.

I tried recreating the whole project again but I'm stuck at this point. I tried Imports PlantWroxModel method because the language which I'm using is VB and I get this error "Type "PlanetWroxEntities" not defined." What do I do now?

Reply me ASAP.

Last edited by jj.johnwilson; February 23rd, 2014 at 07:26 AM..
 
Old February 23rd, 2014, 03:29 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 there,

You may want to check out these threads:

Ch 14 generating entity model
Your Book and VS Versions

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 February 24th, 2014, 05:13 AM
Registered User
 
Join Date: Feb 2014
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default

Changing the Code Generation Strategy from T4 to Legacy ObjectContext solved my problem!

Thank you.
The Following User Says Thank You to jj.johnwilson For This Useful Post:
AlanWheeler (February 24th, 2014)
 
Old February 24th, 2014, 01:15 PM
Authorized User
 
Join Date: Nov 2013
Posts: 84
Thanks: 29
Thanked 2 Times in 2 Posts
Default

Cool! I'm so happy my question actually helped someone else!

aw
 
Old February 25th, 2014, 09:02 AM
Registered User
 
Join Date: Feb 2014
Posts: 7
Thanks: 0
Thanked 1 Time in 1 Post
Default How to make gig pics in planetwrox website clickable

The images in the gig pics section of planetwrox website are fixed and it is hard to see them properly. Is there any way to make them clickable so that they expand for a better viewing?

Thank you.
 
Old February 25th, 2014, 07:07 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 there,

Take a look at exercise 3 in Chapter 14, and the answer in Appendix B. It shows exactly what you are looking for.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ to Entities And Handling Gridview Events Kourosh94 BOOK: Beginning ASP.NET 4.5 : in C# and VB 9 September 29th, 2013 06:23 AM
A simple LINQ to Entities Example (Problem in this Try it out) CompactDisc20 BOOK: Beginning ASP.NET 4 : in C# and VB 5 July 6th, 2013 10:16 AM
Best way to concenate strings in LINQ to Entities? IceThatJaw BOOK: Beginning ASP.NET 4 : in C# and VB 1 December 26th, 2011 05:46 AM
Linq Question about related entities gspro BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 0 March 23rd, 2010 09:29 AM
Comparing Performance Linq To entities and outofBand SQL updates urpcor BOOK: Professional ADO.NET 3.5 with LINQ and the Entity Framework ISBN: 978-0-470-22988-0 4 September 28th, 2009 06:22 AM





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