Another standard tool that provides a way to implement a data access layer is Dapper. We have already taken an overview of Dapper, but this section will cover in more detail how to deal with this package and how to use it to implement a data access layer. The following process will be more SQL-heavy. We will also demonstrate how you can deal with some stored CRUD procedures.
Note that EF Core also provides a way to query data sources by using stored procedures. Moreover, it exposes methods such as DbSet<TEntity>.FromSql() or DbContext.Database.ExecuteSqlCommand(). So, why use Dapper? As mentioned previously, Dapper is a micro-ORM that is simple and faster than EF Core. EF is more of a multipurpose ORM, and it adds a discrete overhead on each operation performed.
Before starting, let's create another project inside the src...