Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: MCSD Certification Toolkit (Exam 70-483): Programming in C#
This is the forum to discuss the Wrox book MCSD Certification Toolkit (Exam 70-483): Programming in C# by Tiberiu Covaci, Rod Stephens, Vincent Varallo, Gerry O'Brien; ISBN: 978-1-118-61209-5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: MCSD Certification Toolkit (Exam 70-483): Programming in C# 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 21st, 2014, 12:38 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default WCF Code Not Producing

Hello All,

Chapter 9
pages 400 - 402

Create a Client Application that Uses WCF Data Services: Am I missing something or is the code bad.

Thanks

Code below is not producing any data

NorthwidsEntities db = new NorthwindsEntities (new Uri("http://localhost:????/NorhtwindsService.svc/"));

var categories = from c in db.Categories select c;

foreach (Category category in categories)
{
Debug.WriteLine(string.Format("CategoryID: {0}, CategoryName: {1}",
category.CategoryID, category.CategoryName));
}
Reply With Quote
  #2 (permalink)  
Old August 21st, 2014, 12:45 PM
Registered User
Points: 13, Level: 1
Points: 13, Level: 1 Points: 13, Level: 1 Points: 13, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2013
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Never Mind

The Debug.WriteLine should be Console.WriteLine... (bad code)
Reply With Quote
  #3 (permalink)  
Old August 21st, 2014, 03:32 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,149, Level: 23
Points: 3,149, Level: 23 Points: 3,149, Level: 23 Points: 3,149, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 642
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I'm not sure if it was the writer's intent (I didn't write that chapter), but you can use Debug much as you can use Console. By default, they do pretty much the same thing. The difference is Debug statements are removed from release builds.

The Debug class in the System.Diagnostics namespace, so the program should probably include that with a using statement.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
Reply With Quote
Reply


Thread Tools
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
Thanks for producing a 3rd edition alanrew BOOK: Professional JavaScript for Web Developers 3rd edition 0 April 12th, 2012 02:21 PM
WCF code Example fcatarino BOOK: Professional C# 2008 ISBN: 978-0-470-19137-8 0 July 21st, 2008 04:38 PM
WCF endpoint error when wrapping WCF service with jdawg1979 Visual Studio 2008 0 July 8th, 2008 11:56 AM
producing XHTML from XSLT holdmykidney XSLT 1 August 24th, 2004 09:00 AM
Report Producing NULL values socoolbrewster Access 2 February 13th, 2004 10:39 AM



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


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