From 4c55ecb42792d7ae8afe7b48c7755f47f72374d0 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Wed, 16 Apr 2025 09:42:55 +0200 Subject: [PATCH] Refactor DbRepository methods for clarity and extensibility Updated methods in the `DbRepository` class to be virtual, allowing for overriding in derived classes. Renamed parameters from `dto` to `entity` and `dtos` to `entities` for improved clarity. All methods still throw `NotImplementedException` as implementations are pending. --- DigitalData.Core.Infrastructure/DbRepository.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DigitalData.Core.Infrastructure/DbRepository.cs b/DigitalData.Core.Infrastructure/DbRepository.cs index d79c673..b224736 100644 --- a/DigitalData.Core.Infrastructure/DbRepository.cs +++ b/DigitalData.Core.Infrastructure/DbRepository.cs @@ -20,27 +20,27 @@ public class DbRepository : IRepository where TDbC Mapper = mapper; } - public Task CreateAsync(TEntity dto, CancellationToken ct = default) + public virtual Task CreateAsync(TEntity entity, CancellationToken ct = default) { throw new NotImplementedException(); } - public Task CreateAsync(IEnumerable dtos, CancellationToken ct = default) + public virtual Task CreateAsync(IEnumerable entities, CancellationToken ct = default) { throw new NotImplementedException(); } - public Task> DeleteAsync(Expression expression, CancellationToken ct = default) + public virtual Task> DeleteAsync(Expression expression, CancellationToken ct = default) { throw new NotImplementedException(); } - public Task> ReadAsync(Expression? expression = null, CancellationToken ct = default) + public virtual Task> ReadAsync(Expression? expression = null, CancellationToken ct = default) { throw new NotImplementedException(); } - public Task> UpdateAsync(TDto dto, Expression expression, CancellationToken ct = default) + public virtual Task> UpdateAsync(TDto dto, Expression expression, CancellationToken ct = default) { throw new NotImplementedException(); }