数据访问层,这么多问题 [英] Data access layer, so many questions

查看:65
本文介绍了数据访问层,这么多问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用stronly类型的数据集进行数据访问。它有效,但还有很多不足之处。首先,你无法使用完整的SQL语句来查询数据集。

I have been using a stronly typed dataset for my data access. It works but it has much to be desired. For one, you can't really query a dataset, using full SQL statements.

无论如何,我看到linq为你创建了一个层,我相信它使用了一个名为sql的工具金属。据我所知,这个图层可以完成类型化数据集的所有操作。

Anyway, I see that linq creates a layer for you, I believe it uses a tool that is called sql metal. As far as I can tell, this layer does everything the typed dataset does.

我的第一个问题是,输入的数据集是否可以被sqlmetal生成的类完全取代?如果是这样,是否有任何类型化数据集所拥有的功能不会包含在sqlmetal类中?

My first question is, can typed datasets be completely replaced by the classes generated by sqlmetal? If so, is there any functionality that the typed datasets posses that won't be included in sqlmetal classes?

并且,sqlmetal类与当前可用的其他对象关系映射器相比如何?今天在市场上?任何人都可以看到Linq对使用其他数据访问技术的当前方法进行了更改吗?

And, how does the sqlmetal classes compare to other object relational mappers that are currently available on the market today? Can anyone see Linq bringing a change to current methodologies that use other data access techniques?

推荐答案

SqlMetal是May CTP的一部分,并且生成一组可以与LINQ to SQL(DLinq)一起使用的类型。  LINQ to DataSet有一个单独的工作,可能更容易与现有代码集成以获得查询功能。

SqlMetal was part of the May CTP, and produces a set of types that can be used with LINQ to SQL (DLinq).  There is a seperate effort for LINQ to DataSet, which may be easier to integrate with your existing code to gain query capabilities.

就个人而言,我很少使用DataSet - DataTable,是的,但不是DataSet的全部 - 所以我不能真正评论它的相对能力。 

Personally, I've rarely used DataSet -- DataTable, yes, but not DataSet in its full extent -- so I can't truly comment on its relative power. 

我希望我们会看到各种针对LINQ的数据库映射器的出现,特别是LINQ to SQL及其表达式查询到SQL的翻译功能。 至少在出现新的时候,开发人员不必学习另一种查询语法(如果查询甚至支持)。 我认为,具有编译器支持的查询引擎(对SQL,XML,对DataSet,对Etc)的组件化是我们将看到的最大(最佳?)更改。 

I expect we'll see the emergence of a variety of database mappers that target LINQ generally, and LINQ to SQL with its expression-query-to-SQL translation capabilities in particular.  At least when new ones show up, the developer won't have to learn Yet Another Query Syntax (if query were even supported).  The componentization of query engines (to SQL, to XML, to DataSet, to Etc) with compiler support, I think, is the biggest (best?) change we'll see. 

 


这篇关于数据访问层,这么多问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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