次の方法で共有


Announcing OData T4 for C#, Preview 1

 

I’m very excited to announce the release of OData T4 for C# Preview 1, for the October 2011 CTP of the next version of WCF Data Services libraries, with support for code generation of service operations. The goal of this T4 preview and subsequent ones will be to get community feedback on the templates before having “Add Service Reference” natively generate T4 templates out of the box in a future release.

Note that support for service operations was added to the T4 because many customers already use it and it has been a regularly requested feature by the community. Having said that, some support for actions/functions (which are the way forward for custom operations) will be introduced in an upcoming refresh to the template.

We are looking to refresh the template by first week of February with feedback from the community as well as any bug fixes reported as well as once more by the time WCF Data Services V3 ships

So please give your feedback at our team forum.

How do I Use it?

- Install Nuget package manager

- Install October 2011 CTP

- Add a Service Reference to an OData service

o This downloads the metadata

- Right-click Add reference-> “Manage NuGet packages”

image001

 

- Search for OdataT4 template

image002

- Install OdataT4-CS package

- This will add a Refrence.tt file in your project

image003

Known Issues, Limitations, and Workarounds

- I get the following error after adding the Nuget package:Running transformation: System.IO.DirectoryNotFoundException: Could not find a part of the path '<projectDirecotryRoot>\Service References\ServiceReference1\service.edmx'.T4 has incorrect edmx file path“

The current template assumes an ‘$projectRoot\ServiceRefrence1\service.edmx”. If your edmx file is in a custom location change the MetadataFilepath property, in Refrence.tt, to point to the correct path.

- There is no T4 for VB

We are looking to release our first preview of the VB template at the time of next refresh

- There is no support for spatial

Spatial support will be included at end of January refresh

 

Thanks

Ahmed Moustafa

Program Manager

Comments

  • Anonymous
    April 01, 2012
    Any new news?  Any updates? EF 5 had a beta release.  Is there a WCF Data Services Beta release planned that will go with it? Please keep us in the loop.

  • Anonymous
    June 28, 2012
    +1. It's very cool to have T4 with OData at last but do you have a new version that fix known issues, limitations and workarounds?