IDataServiceMetadataProvider / ResourceType...对于没有 CLR 类型的动态类型怎么办?
我尝试通过 ADO RIA 公开数据库,但我们只有一个基于 ODBC 的接口。 “数据库”是一个服务器,并且一直在开发新元素,因此我希望服务器在启动时检查元数据(使用 odbc 模式方法),然后通过 RIA 服务公开他发现的内容......客户端可以当他们需要访问新元素时重新生成。
因此,我没有为所有开发的表提供任何 CLR 类型。
ResourceType tableType = new ResourceType(
typeof(object),
ResourceTypeKind.EntityType,
null,
"Martini",
table_name,
false
);
tableType.CanReflectOnInstanceType = false;
我无法以某种方式将 NULl 作为 CLR 元素类型放入,并且在尝试访问属性时输入 typeof(object) 似乎会导致反射错误。有关如何执行此操作的任何文档?我真的不想拥有类型......尽管如果必须的话,我可能会通过字节码发出动态生成一些类型。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://blogs.msdn.com/alexj/archive/2010/03/02/creating-a-data-service-provider-part-9-un-typed.aspx
;)也找到了它迟到了,可悲。
http://blogs.msdn.com/alexj/archive/2010/03/02/creating-a-data-service-provider-part-9-un-typed.aspx
;) found it too late, sadly.