Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Gil Fink is an expert in ASP.NET and Microsoft data platform and serves as a Senior .Net Consultant and Architect at Sela Group. He is a Microsoft data platform MVP and a certified MCPD Enterprise Application Developer. Gil has worked in the past in variety of positions and projects as a leading developer, team leader, consultant and more. His interests include Entity Framework, Enterprise Library, WCF, LINQ, ADO.NET and many other new technologies from Microsoft. Gil is a DZone MVB and is not an employee of DZone and has posted 98 posts at DZone. You can read more from them at their website. View Full User Profile

OData Visualizer Extension

04.06.2010
Email
Views: 3498
  • submit to reddit

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.

 

References
Published at DZone with permission of Gil Fink, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)