Writing the DapperDotNet class
In this section, we'll write our Dapper.NET methods. This is the last section before we write our benchmarking methods. We will run the code we write in this section in the next chapter. Follow these steps:
- Open the
DapperDotNet
class, add theSimpleCRUD
package, and modify it as follows:public class DapperDotNet : IDisposable { private bool isDisposed = false; private IDbConnection _dbConnection; public DapperDotNet(string connection) { SimpleCRUD .SetDialect(SimpleCRUD.Dialect.SQLServer); _dbConnection = new SqlConnection (connection); } public void Dispose() ...