企业库5.0和命令超时 [英] Enterprise Library 5.0 and Command Timeout

查看:113
本文介绍了企业库5.0和命令超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的代码,想知道我们是否需要设置命令超时如果使用企业库的CreateSprocAccessor,如果不是那么如何超时被管理?

I am using following code and want to know whether we require to set command timeout if using CreateSprocAccessor of enterprise library , if not then how timeout is being managed?

var accessor = _sqlDatabase.CreateSprocAccessor<xyz>("uspGetxyz", 
                     new xyzParameters(_sqlDatabase),
                     MapBuilder<xyz>.MapAllProperties().Build());

//Execute the accessor to obtain the results
var Data = accessor.Execute();
xyzList = Data.ToList<xyz>();


推荐答案

Volla!我已经对Enterprise库的源代码进行了更改,添加了一个新的execute方法,它将使用timeOut参数,在Sproc访问器类中,并在我的项目中使用这些二进制文件

Volla!!! i have made changes in source code of Enterprise library, added a new "execute" method which will take timeOut paramerter, in Sproc accessors class and used these binaries in my project

这篇关于企业库5.0和命令超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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