Setting up our database access project
In this section, we will be creating our database access project and classes. In the next chapter, we will be writing some benchmarks that reference the classes that we will write in this chapter. Create the project as follows:
- Open Visual Studio and create a new .NET 6.0 console application called
CH10_DataAccessBenchmarks
. - Add the latest version of the
Microsoft.EntityFrameworkCore.SqlServer
NuGet package. - Add the latest version of the
Dapper
NuGet package. - Add the latest version of the
System.Data.SqlClient
NuGet package. - Add a new folder called
Configuration
, and add two classes calledDatabaseSettings
andSecretsManager
. - Add a folder called
Data
, and add three classes calledAdoDotNetData
,DapperDotNet
, andEntityFrameworkCoreData
. - Add a folder called
Models
, and add three classes calledProduct
,SqlCommandModel
, andSqlCommandParameterModel
. - Add a folder called
Reflection
, and add a class calledProperties...