rest - How do I conviniently consume OData service from .NET code -
is there best-practice approach/library consuming odata services .net code? not have mess building query string , parse response manually?
i envision this:
class person { public string name {get; set;} public int age {get; set;} } void main() { person person = new odatarequest<person>() .endpoint("http://server.com/personservice") .addheader("header", "value") .asjson() .where(p => p.name.endswith("y") && p.age > 21) .skip(10) .take(5) .send(); }
please ignore syntax (and i'm mixing endpoint related stuff query related stuff), convey idea.
the code above supposed automatically build proper odata query string $filter, $skip, etc expressions parse response.
has library of kind been built? or i'm on own here?:)
thanks!
maybe video can : http://msdn.microsoft.com/en-us/data/gg591296.aspx
Comments
Post a Comment