File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public class MyClass
3636
3737var dataReader = new SqlCommand (" SELECT * FROM MyTable" , connection ).ExecuteReader ();
3838
39- List < MyClass > results = dataReader .ToMyClass (); // "ToMyClass" method is generated at compile time
39+ List < MyClass > results = dataReader .To < MyClass > ();
4040```
4141
4242Some notes for the above
@@ -49,6 +49,14 @@ Some notes for the above
4949* Properly maps ` DBNull ` to ` null ` .
5050* Complex-type properties may not work.
5151
52+ ### Legacy Mapping Method
53+
54+ The ` To<T>() ` method has been added to unify the method calls, however the previous version of this method is maintained for now.
55+
56+ ``` csharp
57+ List < MyClass > results = dataReader .ToMyClass ();
58+ ```
59+
5260## Bonus API: ` SetPropertyByName `
5361
5462This package also adds a super fast ` SetPropertyByName ` extension method generated at compile time for your class.
You can’t perform that action at this time.
0 commit comments