Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-jitbit committed Aug 9, 2023
2 parents 336e9cf + 27a742f commit d6e80a0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ public class MyClass
public bool Enabled { get; set; }
}

//ToMyClass() method is generated at compile time
List<MyClass> result = dbconnection.ExecuteReader("SELECT * FROM MyTable").ToMyClass();
var dataReader = new SqlCommand("SELECT * FROM MyTable", connection).ExecuteReader();

//"ExecuteReader" is just a helper method from Dapper ORM, you're free to use other ways to create a datareader
List<MyClass> results = dataReader.ToMyClass(); // "ToMyClass" method is generated at compile time
```

Some notes for the above
Expand Down

0 comments on commit d6e80a0

Please sign in to comment.