[英]Azure table : Fetch without create a specific class or knowing the whole schema
I have a table "constants" with a specific shema like : 我有一个表“常量”,具有特定的shema,如:
PartitionKey, RowKey, Timestamp, ARG1, ARG2, ARG3 分区键,行键,时间戳,ARG1,ARG2,ARG3
for example these entities: 例如,这些实体:
production, 0, 01/01/2012, L, 5, 7 生产,0,01/01/2012,L,5,7
production, 1, 01/01/2012, F, 7, 7 生产,1,01/01/2012,F,7,7
Can I fetch an entity without create a class ? 我可以在不创建类的情况下获取实体吗?
Something as: 如:
var query = MagicFunctionWichGiveAEntity("production", "0"); //0 is the RowKey
var result = query.ValueOf("ARG1") // result = L
I found this post but it look like complicated. 我发现了这篇文章,但看起来很复杂。
The only way to do this is with the ReadingEntity event (as described in the post you reference). 做到这一点的唯一方法是使用ReadingEntity事件(如您所引用的文章中所述)。 If you want to see a fully working implementation I suggest you take a look at the Storage Services Smart Client located here: http://archive.msdn.microsoft.com/appfabriccat/Release/ProjectReleases.aspx?ReleaseId=5474
如果您希望看到一个完全正常的实现,建议您看一下位于以下位置的Storage Services Smart Client : http : //archive.msdn.microsoft.com/appfabriccat/Release/ProjectReleases.aspx?ReleaseId=5474
You'll need to look at the files: 您需要查看以下文件:
An alternative solution would be to interact directly with the REST API where you can get an entity in XML format: http://msdn.microsoft.com/en-us/library/windowsazure/dd179421 一种替代解决方案是直接与REST API交互,您可以在其中获得XML格式的实体: http : //msdn.microsoft.com/zh-cn/library/windowsazure/dd179421
I have written an client that supports dynamic (unspecified) columns by using a dictionary to hold the name/value pairs. 我编写了一个通过使用词典来保存名称/值对来支持动态(未指定)列的客户端。 It also supports many other features like arrays, enumerations and data larger than 64K.
它还支持许多其他功能,例如数组,枚举和大于64K的数据。
It is available free for personal use. 它可供个人免费使用。 You can get it at http://www.lucifure.com or via NuGet.com.
您可以从http://www.lucifure.com或通过NuGet.com获得它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.