South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
Seems fine to me. Couple of things
Use code block, not image.
Drop the "my" prefixes.
"tempList" is a horrible name. "result" is much better, and can be introduced as a coding "standard" for function return variables
In a aptly named namespace?
What do you mean this is a "no no"?
That explains the *Collection part.Just for the record, that image is from a book. Not sure how old it is but fairly old I think.
If you use Dapper you can skip all that mapping crapThis is my own one I am currently using.
List<Job> jobs = conn.Query<Job>("spGetJob");
If you use Dapper you can skip all that mapping crap
Code:List<Job> jobs = conn.Query<Job>("spGetJob");
How would you use Dapper without SqlConnection. The extension methods are on the IDbConnection interface if I recall.Linq? Dapper? EF?
All these available and using SqlConnection![]()
How would you use Dapper without SqlConnection. The extension methods are on the IDbConnection interface if I recall.
You are correct!
Point I was trying to make though is that there are easier ways to do what OP wants to do.
Albeit there is a lesson in learning it this way.
/goes to watch MLP