ADO.NET dataadapter的缺点 [英] Disadvantage of ADO.NET dataadapter

查看:127
本文介绍了ADO.NET dataadapter的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中使用过ADO.net DataAdapter。在我们的ERP应用程序中使用它有什么不利之处???



还有其他技术使用速度快......



我尝试过:



我检查谷歌但我找不到任何合适的解决方案。

解决方案

没有好的或坏的方法从数据库中检索数据,这一切都取决于用户案例和场景。



有多种方法可以检索数据,我们可以根据要求使用



1) Ado.Net数据适配器

2)Ado.Net数据读取器

3)Linq to SQL

4)实体框架

    a)Linq语法

     b)扩展方法



1)Ado.Net数据适配器

 DataAdapter将充当DataSet和数据库。此DataAdapter对象用于从数据库读取数据并将该数据绑定到数据集。 DataAdapter是一个面向断开连接的架构





因此,如果你想以断开的方式获取数据意味着一旦数据适配器执行它将填充数据集与数据并从数据库断开连接,因此数据将出现在UI /应用程序中。



2)Ado.net数据读取器

 DataReader用于从数据库中读取数据,在从数据库中获取数据时,它是一个只读取和转发的面向连接的体系结构





它一次读取一个数据/行,因此可以快速读取多行,它将逐个读取,因此可能需要比数据适配器整体相等/更多的时间,但检索速度非常快第一行与数据适配器相比



3)实体框架

这是一个从数据库中获取数据的ORM模型。高层次的抽象,它是Ado.net之上的层,所以如果我们谈论性能,它会慢一点Ado.net,但如果我们有简单的CRUD操作,则高度用于获取数据。



你可以谷歌上面的主题阅读更多细节,下面的文章很少


I have used for ADO.net DataAdapter in my application.Is there any disadvantage of using this in our ERP application ???

Is there any other technology to use as fast ???

What I have tried:

I have check google but I can not find any proper solution.

解决方案

There is no good or bad way to retrieve the data from a database, it all depends upon user case and scenario.

There are multiple ways to retrieve data, we could be used based on a requirement

1) Ado.Net Data Adapter
2) Ado.Net Data Reader
3) Linq to SQL
4) Entity Framework
    a) Linq Syntax
     b) Extension Method

1) Ado.Net Data Adapter

DataAdapter will act as a Bridge between DataSet and database. This DataAdapter object is used to read the data from a database and bind that data to a dataset. DataAdapter is a disconnected oriented architecture



So if you want to get the data in a disconnected way means once data adapter executes it will fill the dataset with the data and get disconnected from a database, so data will be present in UI /Application.

2) Ado.net Data Reader

DataReader is used to read the data from a database and it is a read and forward only connection-oriented architecture during fetch the data from database



It read one data/row at a time so could be fast ut to read multiple rows it will read one by one so may take overall equal/more time than data adapter but very fast to retrieve the first row as compared to the data adapter

3) Entity Framework
It is an ORM model to fetch the data from database.which provide the high level of abstraction, it is the layer above Ado.net so if we talk about performance it will be little slow than Ado.net but highly used for fetching data if we have simple CRUD operation.

You could google for the above topics to read more details , few article below


这篇关于ADO.NET dataadapter的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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