Category Archives: Blog
Examining OData – Windows Phone 7 Development — How to create your URI’s easily with LINQPad
Today the WCF Data Services team released a new update for the OData Client Library for Windows 7 (get a copy of the source here). There are some things that changed. Most notably, the ability to LINQ on the DataServiceContext created with the new version of the code generation tool. This new tool (get source here) creates a set of classes that allow developers to work with the OData feeds.
Now that LINQ’ing is not available what do we do? We will have to work with URI’s for our queries. This is not difficult but is not as easy as writing LINQ statements with Intellisense. One possible solution to to take your LINQ statements that you created for your Windows Phone 7 project and run them through LINQPad to get the URI that is the equivalent. LINQPad is a great learning tool for LINQ and also will give you some added information about your queries as we will see in this post.
Here is a screenshot using the Baseball Stats OData Feed. You can the LINQ statement to get the current active list baseball franchises from the feed.
Now you can run the LINQ query and get the results
The secret to getting the corresponding URI for the LINQ query is to then select the SQL on the Result toolbar
You will then see the URI equivalent for the LINQ statement you wrote above in the Query section.
Now you can take that URI and use it when working with the OData Client Library for Windows Phone 7.
Windows Phone 7 Developer Launch
Detroit, MI
Westin Book Cadillac Hotel
October 12 – 13, 2010
| To Register to go the following links | |||
| Day 1: Jump-Start | |||
| Day 2: Workshop | |||
Windows Phone 7 Developer Launch
Windows Phone 7 is here – and with it comes a new world of opportunity for passionate, creative developers. Windows Phone 7 gives you the power to build complex, robust applications using consistent hardware specs, a comprehensive development toolkit, and the all-new, full-service Marketplace for selling your apps. Get ready to capitalize on this exciting new frontier with two days of fast-paced learning and Windows Phone 7 development sessions. Pick the day that best fits your needs – or join us for both. Either way, you’ll get the information you need to build high-demand apps with Windows Phone 7.
![]()
Day 1: Jump-Start Your Mobile Development | 8:30am – 5:15pm
In the first of this two-day launch event, we’ll take you under the hood of Windows Phone 7 and the Windows Phone 7 platform with a progressive set of learning sessions. We’ll start with the basic tools and fundamentals of Windows Phone 7 application development and as the day unfolds, we’ll go deeper into development scenarios using Silverlight®, XNA® and the Windows Phone 7 SDK. You’ll also see how to earn cash for your apps in the fully loaded Marketplace.
Day 2: Unleash Your Best App Workshop | 9:00am – 3:00pm
This hands-on workshop is designed to help you turn those napkin sketches and subway scribbles into real, sellable apps. You’ll apply fundamental Windows Phone 7 design principles to build an app and upload it to the fully revamped Marketplace. Go at your own pace or follow along with a proctored group lab. Either way, you’ll get step-by-step advice from Microsoft® and community experts. It’s an unprecedented opportunity to stake your claim in the marketplace – using familiar tools and consistent specs.
The Fall Tour of the OData Workshop – Detroit and Phoenix

Interested in OData? Want to discover what the next revolution in data will be? In this workshop, the attendee is invited to consider the many opportunities and challenges for data-intensive applications, interorganizational data sharing for “data mashups,” the establishment of new processes and pipelines, and an agenda to exploit the opportunities as well as stay ahead of the data deluge.
October 6 – Southfield, MI
- 1:00pm – 4:30pm 1290 Microsoft Southfield Office 1000 Town Ctr, Suite 1930, Southfield, Michigan 48075 http://tinyurl.com/ODataDetroit
October 25 – Phoenix, AZ
- 1:00pm – 4:30pm 1290 Doubletree Paradise Valley Resort 5401 N Scottsdale Road, Coronado/Palomas Room, Scottsdale, AZ 85250 http://tinyurl.com/ODataPhoenix
Abstract
The Open Data Protocol (OData) is an open protocol for sharing data. It provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value.
OData is consistent with the way the Web works – it makes a deep commitment to URIs for resource identification and commits to an HTTP-based, uniform interface for interacting with those resources (just like the Web). This commitment to core Web principles allows OData to enable a new level of data integration and interoperability across a broad range of clients, servers, services, and tools.
OData is released under the Open Specification Promise to allow anyone to freely interoperate with OData implementations.
In this talk Chris will provide an in depth knowledge to this protocol, how to consume a OData service and finally how to implement an OData service on Windows using the WCF Data Services product.
Agenda
· Introductions (5 minutes)
· Overview of OData (10 minutes)
· The OData Protocol (1 hour)
· 15 minute break
· Producing OData Feeds (1 hour)
· Consuming OData Feeds (1 hour)
Bio
Chris Woodruff (or Woody as he is commonly known as) has a degree in Computer Science from Michigan State University’s College of Engineering. Woody has been developing and architecting software solutions for almost 15 years and has worked in many different platforms and tools. He is a community leader, helping such events as Day of .NET Ann Arbor, West Michigan Day of .NET and CodeMash. He was also instrumental in bringing the popular Give Camp event to Western Michigan where technology professionals lend their time and development expertise to assist local non-profits. As a speaker and podcaster, Woody has spoken and discussed a variety of topics, including database design and open source. He is a Microsoft MVP in Data Platform Development. Woody works at RCM Technologies in Grand Rapids, MI as a Principal Consultant.
Woody is the co-host of the popular podcast “Deep Fried Bytes” and blogs at www.chriswoodruff.com. He is the President of the West Michigan .NET User Group and also is a co-founder of the software architecture online portal nPlus1.org.
Woody has worked in many arenas throughout the years, including healthcare, manufacturing, publishing, promotion execution and the automotive industry. He has experience with starting and running new ventures, including past work with technology startups. Woody continues to develop his expertise by learning & developing new technologies to better meet the needs of his clients, while devoting his free time to improving the development community at large, and giving back to the community in which he lives.
OData/WCF Data Services — Composite Keys and $expand URI Option Bug
There is a bug in WCF Data Services with the $expand command when targeting entity collections with composite keys in the EDM. Below is the database diagram image for 2 tables in the baseball stats OData project I have been working on.
http://baseball-stats.info/OData/baseballstats.svc
You will see in the diagram that the Batting table has 5 fields that comprise the PK of the table. I don’t want to debate about using composite keys since I did not create this data model ![]()
After creating the EDM and the WCF Data Service, I am finding that when I use the $expand command I only get 1 Batting entity record returning for a Player entity.
An example is this URI that is supposed to return the Batting data for Hank Aaron with his Player data.
http://www.baseball-stats.info/OData/baseballstats.svc/Player(‘aaronha01′)?$expand=Batting
After discussing this bug on the OData mailing list, Phani Raj gave a great explanation to why this issue occurs:
The issue arises when you have a navigation property that has a composite key ( Players-> Batting ) and the set of the navigation property (Batting) has server-driven-paging limits imposed on it.
In this case, the query that is sent to the database and the results returned from the store are correct, but the materialization of the results into objects is incorrect at the EF layer.
Hence, when we write the results out, we see only one row returned for the navigation property which was expanded.
In the end if you need to get associated entity records in your OData feeds and the $expand does not work you can always get them the direct way.
http://www.baseball-stats.info/OData/baseballstats.svc/Player(‘aaronha01′)/Batting
GeekGolf 2010 on September 11, 2010: Golfing, Steak Dinner and Fun
Where: The Legacy by Author Hill, 7677 US 223, Ottawa Lake, MI 49267
When: September 11, 2010 @ 2PM (4 groups booked)
What: Golfing, Dinner and fun
Price: $49 for 18 Holes+cart, range balls, steak dinner
Register at http://geekgolf2010.eventbrite.com/








