refactoring

pull/1/head
a.bozhenov 5 years ago
parent f998e01655
commit e6040b1cce

@ -18,6 +18,7 @@ namespace ZeroLevel.SqlServer
int ExecuteNonResult(string query);
int ExecuteNonResult(string query, DbParameter[] par);
DbReader ExecuteReader(string query, DbParameter[] par);
void LazySelect(string query, DbParameter[] par, Func<DbDataReader, bool> readHandler);
void LazySelect(string query, DbParameter[] par, Func<DbDataReader, bool> readHandler, int timeout);
T Read<T>(DbDataReader reader, int index);

@ -250,6 +250,9 @@ namespace ZeroLevel.SqlServer
}
#region LazySelect
public void LazySelect(string query, DbParameter[] par, Func<DbDataReader, bool> readHandler)
=> LazySelect(query, par, readHandler, Timeout);
public void LazySelect(string query, DbParameter[] par, Func<DbDataReader, bool> readHandler, int timeout = Timeout)
{
using (var connection = _factory.CreateConnection())

Loading…
Cancel
Save

Powered by TurnKey Linux.