Metadata for ADO.NET Data Services

ADO.NET Data Services have a "magic" resource, called $metadata. This entry point returns a CSDL document, which is generated as described on this MSDN page.

Why CSDL? Well, it turns out that it's a great language to give a high-level description of data structure. It's also how the ADO.NET Entity Framework models entities and relationships. If you're not familiar with it, I encourage you to go over Introducing the Entity Framework and Data Modeling in the Entity Framework.

One tip: if you're building an ADO.NET Data Service on an Entity Framework data source, any custom properties defined on CSDL elements will flow through the $metadata resource.