OData v4 Client Code Generator

Microsoft Free

An item template that simplifies the process of accessing OData v4 services by generating C# and VB.Net client-side proxy classes.

Microsoft
(4) Review
Visual Studio
2015, 2013, 2012
Download (40,625)
9/1/2015
2.4.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (4)
Q and A (37)
Sign in to write a review
Sort by:

by HansBrrix | September 19 2016

Doesn't work in VS2015 Update 3.
Install goes ok, put template doesn't appear in list when try to add new item.

by rahul7720 | November 16 2015

Pros:
Awesome tool.
Increased productivity.

Cons.
No Annotations generated.


by LongDinhLe | October 21 2015

This scaffolding is pure awesomeness for OData v4..!

by ImGonaRot | November 26 2014

Great start but falls short in a few areas such as authentication and function / action calls.

Sign in to start a discussion


  • OData Client Template doesn't appear in Add New Item dialog
    2 Posts | Last post September 19, 2016
    • I was able to install the extension successfully in VS2015 Update 3, but the code template doesn't appear in the Add New Item dialog box.
      
      Is this extension still supported? It doesn't appear to have been updated in the last year.
    • Same issue here.
  • OAuth / Azure AD support?
    1 Posts | Last post September 09, 2016
    • Does this support Azure AD's OAuth tokens?
  • Getting errors while adding oDataClient.tt
    2 Posts | Last post September 08, 2016
    • Tried with both VS2013 Update 5 and VS2015 Update2. 
      Errors - 
      1. A namespace cannot directly contain members such as fields or methods
      2. Compiling transformation: The type or namespace name 'Vocabularies' does not exist in the namespace 'Microsoft.OData.Edm'
      
    • I am hitting the same error. How did you resolve this issue?
  • string[] array from custom function not supported
    3 Posts | Last post July 10, 2016
    • We have custom functions that return some string[] arrays. The generated output results in something like this:
      
      namespace Our.Namespace.Client.System {
          [global::Microsoft.OData.Client.OriginalNameAttribute("String[]")]
          public partial class String[]
          {
          }
      }
      
      .. which ends up being used wherever string[] was used. Obviously this is not even going to compile. 
      
      1) The proxy generator should know how to deal with arrays
      2) The proxy generator should not replicate System.* types.
      
    • oh and fyi an example of the custom function looks like this in the edm definition:
      
      var functn = builder.Function("GetSettingListItems")
      	.Returns<string[]>();
      functn.Parameter<long>("SettingListId");
      
    • Nevermind. I realized after posting that I should be using .ReturnsCollection<T>().
  • Support for GroupBy and Aggregate at OData Client Code Generator
    1 Posts | Last post June 15, 2016
    • With the basic support for groupby and aggregates at the Server ( https://github.com/OData/WebApi/issues/70 ), i think the Client should too be enabled to query those new features.
      
      MORE INFO AT: https://github.com/OData/odata.net/issues/596
      
  • Visual Studio 2015 Update 2
    8 Posts | Last post May 02, 2016
    • This does not appear to work with Visual Studio Update 2.  Is there an update for this generator planned?
    • I would like to know about this as well as I am having the same issue.
    • I too am having the issue
    • Seems to be an issue with T4 templates and not necessarily this extension.  https://connect.microsoft.com/VisualStudio/feedback/details/2540224
    • I've logged as an issue in GitHub: https://github.com/OData/odata.net/issues/527
      
    • Same here, "OData v4 Client Code Generator" stopped working after upgrading to "Visual Studio 2015 Update 2".
    • Also experiencing this issue.  Here are the errors I am receiving:
      
      Compiling transformation: The type 'Func<,>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.	
      Compiling transformation: The type 'XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
      Compiling transformation: The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.	
      Compiling transformation: Operator '!=' cannot be applied to operands of type 'method group' and '<null>'	
      Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmModel>' because 'System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmModel>' does not contain a public definition for 'GetEnumerator'
      Compiling transformation: The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
      Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmStructuralProperty>' because 'System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmStructuralProperty>' does not contain a public definition for 'GetEnumerator'
      Compiling transformation: foreach statement cannot operate on variables of type 'System.Collections.Generic.IEnumerable<Microsoft.OData.Edm.IEdmEntitySet>' because 'System.Collections.Ge
    • Hi all, sorry for reply you so late.
      
      This is an issue that T4 cannot work with portable library after vs 2015 update 2. It seems to be VS2015 issue. 
      
      From the comments of https://connect.microsoft.com/VisualStudio/feedback/details/2451005/some-t4-templates-are-broken-in-update-2-ctp-and-rc. The VS team might release a hot fix within the next week.
      
      Now, let's either wait for the hot fix, or use another workaround that use "OData Connected Service" to generate the proxy. please do not check "Whether to include the T4 files into this project". See 
      http://odata.github.io/odata.net/#OData-Client-Code-Generation-Tool
  • Adding User and password
    1 Posts | Last post January 27, 2016
    • Dear , I need to access an OData that requires username and password with BASIC authentication method. How can I customize the 2.4 version to pass these parameters and generate the correct code ?
  • how to exclude some properties from serialising?
    1 Posts | Last post January 18, 2016
    • Hello, i used template to generate client entities and container, then i would like to have some computed properties and made them in partial class of entity, but then on SaveChanges i have error 'cos it tries to serialise those properties. 
      All attributes that i've tried to add to not serialise not worked. Also i dont know how to override the process of serialising to exclude it manually (.Configurations.RequestPipeline.OnEntryStarting might be the ones i need but i cant recognise how to use it)
      Please help, thanks.
  • Custom Routes
    1 Posts | Last post January 12, 2016
    • Does this support custom routes?  If so, how would you add the custom routes?
      
      Example:
      
      Normal: http://localhost:4242/odata/api/v1/Products
      Custom: http://localhost:4242/odata/api/v1/Products(1)/Orders   Where this is custom and logic has been added to grab the correct controller and action.
  • Batch Update
    1 Posts | Last post January 12, 2016
    • Does it support batch update (POST/PATCH/DELETE)? 
      
      
      Thanks!
      
      Richard
1 - 10 of 37 Items