Search code examples
c#timeoutcommandenterprise

Enterprise Library 5.0 and Command Timeout


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>();

Solution

  • 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