File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public class MyClass
36
36
37
37
var dataReader = new SqlCommand (" SELECT * FROM MyTable" , connection ).ExecuteReader ();
38
38
39
- List < MyClass > results = dataReader .ToMyClass (); // "ToMyClass" method is generated at compile time
39
+ List < MyClass > results = dataReader .To < MyClass > ();
40
40
```
41
41
42
42
Some notes for the above
@@ -49,6 +49,14 @@ Some notes for the above
49
49
* Properly maps ` DBNull ` to ` null ` .
50
50
* Complex-type properties may not work.
51
51
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
+
52
60
## Bonus API: ` SetPropertyByName `
53
61
54
62
This 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