1

I have read this document "http://jaydata.org/blog/how-to-use-jaydata-with-asp.net-web-api---i" and it shows a very clear and simple way to user web api odata, but in this example, all the data types are defined manually, and I read the words from the document "The ASP.NET Web API provider does not use server generated metadata to setup the client. You need to provide the JayData library with some information about the data types your about to deal with. This at the moment you can only do manually. Version 1.2.7 of JayData brings Visual Studio development time support for autogenerating the client environment." Currently, the version 1.2.7.1 is released, but I can't find any information that how to use some tools from jaydata to auto generate these data types. Is there any document for this?

1 Answer 1

0

Yes, we promised it and we did a proof of concept but nobody has asked about it since that post, you're the first, so we think that our current users are happy with either creating the model manually or using WebAPI with oData where the model can be built either dynamically from $metadata or statically with JaySvcUtil. I can not promise any date when we'll release it. Can't you just use WebAPI with oData ?

5
  • 1
    Thank you. Currently, My project is just web api with oData, so I ask the question that how to create the data types in js for web api odata metadata automaticlly.
    – frank
    Commented Mar 29, 2013 at 3:20
  • We are impatiently waiting TypeScript 0.9 to be released. The lack of the generics feature is that prevents us from doing a major extension to our TypeScript implementation that will let you define WebAPI calling types with just TypeScript. Since TS 0.9 is already in the dev branch at typescript.codeplex.com it should not be very long from now... Commented Mar 29, 2013 at 7:57
  • sorry, Peter misunderstood you and thought that you need TypeScript. You have 3 choices: 1. write the model definition manually in javascript 2. create a helper function on the server side which iterates on type definition using reflection and outputs javascript model definition Commented Mar 29, 2013 at 10:27
  • 1
    3. use the latest microsoft package and add a few lines so that it generates $metadata for you and on the client side jaydata can build the model definition on-the-fly from $metadata, you can read more about configuring webapi for $metadata here: blogs.msdn.com/b/webdev/archive/2013/01/29/… choose a method which is ok for you and it you need help implementing it just ask here or on our own forum Commented Mar 29, 2013 at 10:28
  • Thank you! I will have a try.
    – frank
    Commented Apr 5, 2013 at 2:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.