string sql = "SELECT * FROM Invoices"; using (var conn = My.ConnectionFactory()) { var invoices = conn.Query<Invoice>(sql); }
Yes and no! People are still arguing about it. Dapper has earned the title of king of the C# Micro ORM but is considered by multiple people as a simple object mapper for .NET.
Yes and no! People will prefer Dapper when they want to write the SQL query themselves with optimal performance.
Yes, it's 100% safe if you use parametrized queries as you should always do!
No, but a third-party library does: Dapper Plus. It's a prime library that extend Dapper with all bulk operations.
Learn MoreProbably yes since Dapper provides extensions to the IDbConnection interface. It's your job to write the SQL compatible with your database provider.
Yes, Dapper support transaction and every method that can use one have an optional parameter to specify it.