3
votes

Are there any examples on using JayData with WebAPI ? Its not OData, but just a set of endpoints:

/api/Projects /api/users /api/something

I am just looking for a simple solution to get my webapi data to the client and send it back when changed for updating the backend. If there are other tools that work better with WebAPI im fine with that.

2
So you are not planning to add some metadata services? - Peter Aron Zentai
I dont know. Until now I feel im using time on nothing. I see how metadata is nice when you have a big project and dont want to typeset objects on the client. It might just be that i need the right tool for creating the meta data. My issue with the metadata is from what I have seen, it maps the dbcontext. I would like to create custom WebAPI and not just let a client query a dbcontext. 1) There might be fields i dont want to send to the client. - Poul K. Sørensen

2 Answers

3
votes

we are about to release the JayData ItemStore API that let's you connect to OData endpoints without an actual OData metadata service, ideal for WebAPI.

I try to submit you an example here today...

UPDATE: Well, a month have passed, but finally, here is the example: WebAPI with JayData - 1st session

0
votes

web api odata package added support to build your own $metadata. please install the package from Install-Package Microsoft.Data.OData.Contrib -Pre.

ODataModelBuilder can build model explicitly, while ODataConventionModelBuilder provides a more convenient way to build model based conventions like recognizing DataMember attibutes.

Please check the blog and the sample