如何有效使用数据访问层 [英] How to use Data Acesses Layer effectively

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

问题描述

嗨..

我为SQL操作(例如Insert,Update,Delect,Select)创建了一个Class.cs文件.并且我在每个页面中为Class.cs创建了一个对象,并执行了Sql操作..

它运行良好,并提供最佳输出.但是当我发生对象函数时,Class.cs文件每次都与Sql Server通信.
由于该数据传输速率提高,并且需要更多时间才能完成Sql操作..

如何避免每次都与SQL-SERVER进行通信.


问候

SureshKumar.Y

Hi..

I am Created A Class.cs File for SQL Operations(Such as Insert,Update,Delect,Select). and I am Created a Object for Class.cs in every page and execute the Sql Operations..

It Runs well And Gives The Best OutPut. But when I occurs The Object Functions, each and every time Class.cs File Communicates With The Sql Server..

For That Data Transfer Rate Is Increased And Take Some more Time For Finishing Sql Operation..

How Can I avoid Communicating With SQL-SERVER Each And Every Time.


Regards

SureshKumar.Y

推荐答案


您如何处理课程文件?
我认为您正在类构造器中执行一些sql操作.
请仔细查看您的班级文件.
为了避免频繁的sql操作,请更有效地使用状态管理"概念,例如ViewState,Session等.以及ADO.Net DataAdapters
和数据集.这将通过减少数据库访问次数来帮助提高应用程序的性能.
Hi,
How have you handled your class file ??
I think you are doing some sql operation in your class constructor.
Please relook your class file well.
And to avoid frequent sql operations use State Management concepts more effectivly like ViewState,Session,etc. along with ADO.Net DataAdapters
and DataSets. This will help in improving your application''s performance by reducing trips to database.


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

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