dapper run sql script with parameters

Solutions on MaxInterview for dapper run sql script with parameters by the best coders in the world

showing results for - "dapper run sql script with parameters"
Stefano
12 Jul 2017
1var parameters = new { UserName = username, Password = password };
2var sql = "select * from users where username = @UserName and password = @Password";
3var result = connection.Query(sql, parameters);