views:

13

answers:

1

I was given XML files I believe were generated from an oData service endpoint with the $metadata url parameter.

My question, how do I take these files and generate classes? Or am I thinking about this all wrong?

Be advised, these XML files were emailed to me.

Cheers!

A: 

If you have the $metadata output as a file you can use the datasvcutil.exe tool to generate the client side classes. DataSvcUtil /language:VB /version:2.0 /dataServiceCollection /out:"data.vb" /in:"file.edmx" Note that you need to rename your metadata file to have the edmx extension for the tool to work correctly. You can lookup the documentation about the tool in msdn here: http://msdn.microsoft.com/en-us/library/ee383989.aspx

Vitek Karas MSFT
Does the same command work for .NET3.5?
Chris
Yes, the datasvcutil.exe should be part of .NET 3.5 SP1, or if you install the update for ADO.NET Data Services.
Vitek Karas MSFT

related questions