title: Using IEdmModel to resolve EntitySet name into EntityName (Products -> Product)
body: <p>I am using a OData Service on top of Entity Framework</p>
  
  <pre><code>var uri = new Uri("http://localhost:9876/Service.svc");
  var context = new DataServiceContext(uri, , DataServiceProtocolVersion.V3);
  var model = EdmxReader.Parse(
      XmlReader.Create(context.GetMetadataUri().AbsoluteUri)
  );
  context.Format.UseJson(model);
  </code></pre>
  
  <p>Now I need to figure out the entity name name from an EntitySet name</p>
  
  <p>My entities are called <code>Product</code> or <code>Customer</code> but the Name of the <code>EntitySet</code> can be either <code>Products</code> or <code>CustomerSet</code> or something else.</p>
  
  <p>Since I already loaded the <code>IEdmModel</code> and the information is located in the <code>$metadata</code> is there a way to resolve the entity name from the IEdmModel? </p>