IDataServiceMetadataProvider / ResourceType.... what for dynamic types with no CLR type?

Posted by TomTom on Stack Overflow See other posts from Stack Overflow or by TomTom
Published on 2010-03-10T11:21:30Z Indexed on 2010/05/21 23:00 UTC
Read the original article Hit count: 446

Filed under:
|
|
|

Hello,

I try to expose a database via ADO RIA for which we have only an ODBC based interface. The "database" is a server and new elements are developped all the time, so I would like the server to check metadata at start (using the odbc schema methods) and then expose what he finds via RIA services.... clients can the nregenerate when they need access to new elements.

As such, I dont ahve any CLR types for all the tabled developped.

ResourceType tableType = new ResourceType(
typeof(object),
ResourceTypeKind.EntityType,
null,
"Martini",
table_name,
false
);
tableType.CanReflectOnInstanceType = false;

I can somehow not put in NULl as CLR element type, and entering typeof(object) seems to result in reflection errors when trying to access the properties. Any documentation on how to do that? I dont really want to get into having types... though if I have to, I probably will dynamically generate some via bytecode emit.

© Stack Overflow or respective owner

Related posts about c#

Related posts about astoria