Writing the AdoDotNet class
In this section, we will be writing our data insertion methods. However, we will not be running our benchmarks, which will be performed in the next chapter as we analyze our results. Follow these steps:
- Update the
AdoDotNetData
class, as follows:using CH10_DataAccessBenchmarks.Models; using CH10_DataAccessBenchmarks.Reflection; using System; using System.Collections; using System.Collections.Generic; using System.Data.Common; using System.Data.SqlClient; using System.Reflection; internal class AdoDotNetData : IDisposable { private readonly SqlConnection _sqlConnection; private bool _isDisposed; public AdoDotNetData(string connectionString) { _sqlConnection = new SqlConnection(connectionString); } public void Dispose() { Dispose(_isDisposed); } public void Dispose(bool disposing) { ...