This project is read-only.

Untyped / Open Type

Topics: ASP.NET Web API
Dec 5, 2013 at 4:44 PM

I'm working on a concept to expose our dynamic data model using OData Web API. The application I'm talking about is multi-tenant enabled where every tenant can have a different data model.
I already managed to dynamically create the EdmModel at the beginning of the request by writing a custom HttpRoute (copying most of ODataRoute and creating the EdmModel on demand), which i think will work fine.

Our data model also features a query language where the result type depends on the query (somewhat like c#'s new { Name = "asfd", Grade = 1.0m }). I would like to expose an Function/Action that accepts a query as a parameter (string) and returns the result. Therefore I don't know the result type until the query is parsed.

I know that OData has a concept for this (Open Types) but I can't seem to find a way to expose this using OData Web API. Is this implemented, on the roadmap or at least on the radar?

Kind Regards,