mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Replace stored-procedure repositories with Dapper-based repositories
Removes the USP_* stored procedures for Auth, Location, and Brewery data access in favour of services built with Dapper. Adds a new Features.Locations slice and optimistic concurrency support for the Brewery slice.
This commit is contained in:
@@ -3,8 +3,8 @@ using System.Data.Common;
|
||||
namespace Infrastructure.Sql;
|
||||
|
||||
/// <summary>
|
||||
/// Base class for ADO.NET-based repositories, providing shared connection creation and
|
||||
/// entity-mapping infrastructure for derived repository implementations.
|
||||
/// Base class for Dapper-based repositories, providing shared connection creation for derived
|
||||
/// repository implementations.
|
||||
/// </summary>
|
||||
public abstract class Repository<T>(ISqlConnectionFactory connectionFactory)
|
||||
where T : class
|
||||
@@ -19,9 +19,4 @@ public abstract class Repository<T>(ISqlConnectionFactory connectionFactory)
|
||||
await connection.OpenAsync();
|
||||
return connection;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Maps the current row of a data reader to an instance of <typeparamref name="T" />.
|
||||
/// </summary>
|
||||
protected abstract T MapToEntity(DbDataReader reader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user