Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-jitbit authored May 5, 2023
1 parent 2b4b835 commit 27a742f
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 27a742f

Please sign in to comment.