Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added missing using statement to reader

  • Loading branch information...
commit 3acd477cfc16bc12459d9a51af54b7e424b85eb4 1 parent 8a514ee
David Savage authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 Massive.cs
9 Massive.cs
View
@@ -195,9 +195,12 @@ public class DynamicModel : DynamicObject {
/// </summary>
public virtual IEnumerable<dynamic> Query(string sql, params object[] args) {
using (var conn = OpenConnection()) {
- var rdr = CreateCommand(sql, conn, args).ExecuteReader();
- while (rdr.Read()) {
- yield return rdr.RecordToExpando(); ;
+ using (var rdr = CreateCommand(sql, conn, args).ExecuteReader())
+ {
+ while (rdr.Read())
+ {
+ yield return rdr.RecordToExpando(); ;
+ }
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.