Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET MVC 2
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET MVC 2
This is the forum to discuss the Wrox book Professional ASP.NET MVC 2 by Jon Galloway, Scott Hanselman, Phil Haack, Scott Guthrie, Rob Conery; ISBN: Professional ASP.NET MVC 2
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 7th, 2010, 06:04 PM
Registered User
Join Date: Aug 2010
Posts: 3
Thanks: 1
Thanked 1 Time in 1 Post
Default NearestDinners Routine

I have worked my way to the FindByLocation routine (page 141) and it will not work. I have verified that everything is correct prior to that but I get an IDE error telling me that NearestDinners does not exist in the current context. I have tried searching the web, placing containers in front of the call, and many other things. What is the fix for this?
  #2 (permalink)  
Old August 10th, 2010, 06:09 PM
Registered User
Join Date: Aug 2010
Location: Durham, UK
Posts: 1
Thanks: 0
Thanked 4 Times in 1 Post
Default NearestDinner Function

Totally missed from the book and code snippets - but here it is from the sample site:

// Helper Methods

[EdmFunction("NerdDinnerModel.Store", "DistanceBetween")]
public static double DistanceBetween(double lat1, double long1, double lat2, double long2) {
	throw new NotImplementedException("Only call through LINQ expression");

public IQueryable<Dinner> NearestDinners(double latitude, double longitude) {
	return from d in entities.Dinners
			where DistanceBetween(latitude, longitude, d.Latitude, d.Longitude) < 100
			select d;

Last edited by Aldo; August 10th, 2010 at 06:14 PM.. Reason: Error in object reference
The Following 4 Users Say Thank You to Aldo For This Useful Post:
firedrawndagger (November 7th, 2010), Olin (January 21st, 2011), slink9 (August 10th, 2010)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Objects ( S.Q.L. in sub-routine ) ? liamfitz BOOK: Visual Basic 2008 Programmer's Reference ISBN: 978-0-470-18262-8 0 June 29th, 2009 03:46 PM
Routine Maintenance englere BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 10 May 2nd, 2009 04:25 AM
sub Routine problem NitinJoshi General .NET 1 January 5th, 2005 04:10 AM
File copy routine error! Janet C++ Programming 3 March 13th, 2004 02:41 PM

All times are GMT -4. The time now is 06:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.