检索使用对象的DataReader [英] Retrieve Datareader using Objects

查看:230
本文介绍了检索使用对象的DataReader的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾使用的DataReader并填充它的DataTable从SQL数据库检索数据。但是,我想知道是否有什么办法可以处理来自DataReader的数据不使用的数据表?我均值使用的对象应该更preferable处理表中的值。

I have worked on retrieving the data from SQL database using Datareader and populate it in Datatable.. But, I am wondering whether is there any way to handle the data from datareader without using datatable ? I mean- handling the table values using Objects should be more preferable..

不过,我不想在这里使用LINQ,因为,我将使用ADOMD对象从数据库(立方体)提取数据。

But, I dont want to use LINQ here since, I am going to use ADOMD object to pull the data from database(Cubes)..

推荐答案

看一看的短小精悍点网。我不知道它是如何工作与ADOMD.NET,但它巧妙地物化查询结果的动态对象。

Have a look at dapper-dot-net. I'm not sure how it works with ADOMD.NET, but it does neatly materialise query results in dynamic objects.

这篇关于检索使用对象的DataReader的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆