提交 ad656ad8 编写于 作者: S Sam Saffron

remove buffered ... in this case I do not think it helps

上级 b87c6c1d
......@@ -778,15 +778,14 @@ internal GridReader(IDbCommand command, IDataReader reader, IDbConnection connec
/// <summary>
/// Read the next grid of results
/// </summary>
public IEnumerable<T> Read<T>(bool buffered = true)
public IEnumerable<T> Read<T>()
{
if (reader == null) throw new ObjectDisposedException(GetType().Name);
if (consumed) throw new InvalidOperationException("Each grid can only be iterated once");
var identity = new Identity(sql, connection, typeof(T), null);
var deserializer = SqlMapper.GetDeserializer<T>(identity, reader);
consumed = true;
var results = ReadDeferred(gridIndex, deserializer);
return buffered ? results.ToList() : results;
return ReadDeferred(gridIndex, deserializer);
}
// todo multimapping.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册