Over a million developers have joined DZone.

OData Visualizer Extension

·

Yesterday I wrote OData 
Visualizer Extension about VS2010 extension manager. One of the great extensions that you can download and use is the OData Visualizer. The OData Visualizer helps us to get a visual graph of the OData Protocol’s types, properties, associations, and other aspects of the EDM which you get from an OData metadata endpoint.

Installing OData Visualizer

Installing the OData Visualizer is very easy. Go to your Extension Manager and search for OData Visualizer in the online gallery. Once you find it just install it and then restart VS2010 in order to it to be available. It is also available in the Visual Studio Gallery from here.

Setting the Environment

In order to use the OData Visualizer you need to have an OData etadata endpoint which is referenced in a project. In the example I use the following WCF Data Service which was created on top of a school EDM:

public class SchoolDataService : DataService<SchoolEntities>
{
public static void InitializeService(DataServiceConfiguration config)
{
config.SetEntitySetAccessRule("*", EntitySetRights.AllRead);
config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V2;
}
}

I have created a console application and created a service  reference to the service I showed above.

Using the OData Visualizer

In the Solution Explorer click the right mouse button on the created service reference and choose the View in Diagram menu item:
View in Diagram

This will result in the following OData Protocol Model Browser:
OData Protocol Model Browser

After opening the OData Protocol Model Browser you can start visualizing your model. Use the Conceptual Model Content to add all the aspects you want to visualize. For example, after I click on add all for Entity Types this is the graph I get:
Entities Graph

You can also see in the right menu that I have a model browser that helps to navigate the model and see all its aspects. You can also export the model into a XPS file if you like.

Summary

When using OData Protocol if you want to see a visual representation of the model you can do it using the OData Visualizer. As I showed in the post it is very easy to install it and to use it as a VS2010 extension. I found that tool very useful and I recommend you to download it too.

 

Topics:

Published at DZone with permission of Gil Fink, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}