FAQ Database Discussion Community


Should dapper use a “using” statement?

c#,dapper,micro-orm
I have seen examples where someone is doing: IDbConnection db = new MySqlConnection(conn); var people = db.Query<People>("SELECT * FROM PEOPLE").ToList(); or is the above a bad practice and should all queries be put in using statements like so: using (var db = new MySqlConnection(conn)) { var people = db.Query<People>("SELECT *...