Bump version numbers and enhance repository interfaces

- Incremented version numbers in project files for updates.
- Marked `ICRUDRepository` as obsolete; use `IRepository` instead.
- Improved parameter names and signatures in `IRepository`.
- Changed access modifiers in `DbRepository` for broader access.
- Updated `CreateAsync` and `UpdateAsync` methods for async operations.
- Implemented `ReadAsync` and `DeleteAsync` methods in `DbRepository`.
- Minor whitespace change in `.csproj` files.
- Retained package description in `DigitalData.Core.Infrastructure.csproj`.
This commit is contained in:
Developer 02
2025-04-17 12:53:40 +02:00
parent 5427a9722d
commit 0c529b199b
6 changed files with 49 additions and 31 deletions

View File

@@ -17,9 +17,9 @@
<RepositoryUrl>http://git.dd:3000/AppStd/WebCoreModules.git</RepositoryUrl>
<PackAsTool>False</PackAsTool>
<PackageIcon>core_icon.png</PackageIcon>
<Version>3.4.0</Version>
<AssemblyVersion>3.4.0</AssemblyVersion>
<FileVersion>3.4.0</FileVersion>
<Version>3.4.1</Version>
<AssemblyVersion>3.4.1</AssemblyVersion>
<FileVersion>3.4.1</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@@ -5,7 +5,6 @@
/// </summary>
/// <typeparam name="TEntity">The type of the entity this repository works with.</typeparam>
/// <typeparam name="TId">The type of the identifier for the entity.</typeparam>
[Obsolete("ICRUDRepository has been deprecated. Please use the IRepository interface instead, which provides a better abtraction (e.g. without tracking) and flexibility.")]
public interface ICRUDRepository<TEntity, TId> where TEntity : class, IUnique<TId>
{
/// <summary>

View File

@@ -4,13 +4,13 @@ namespace DigitalData.Core.Abstractions.Infrastructure;
public interface IRepository<TEntity>
{
public Task<TEntity> CreateAsync(TEntity dto, CancellationToken ct = default);
public Task<TEntity> CreateAsync(TEntity entity, CancellationToken ct = default);
public Task<TEntity> CreateAsync(IEnumerable<TEntity> dtos, CancellationToken ct = default);
public Task<IEnumerable<TEntity>> CreateAsync(IEnumerable<TEntity> entities, CancellationToken ct = default);
public Task<IEnumerable<TEntity>> ReadAsync(Expression? expression = null, CancellationToken ct = default);
public Task<IEnumerable<TEntity>> ReadAsync(Expression<Func<TEntity, bool>>? expression = null, CancellationToken ct = default);
public Task<IEnumerable<TEntity>> UpdateAsync<TDto>(TDto dto, Expression expression, CancellationToken ct = default);
public Task UpdateAsync<TUpdate>(TUpdate update, Expression<Func<TEntity, bool>> expression, CancellationToken ct = default);
public Task<IEnumerable<TEntity>> DeleteAsync<TDto>(Expression expression, CancellationToken ct = default);
public Task DeleteAsync<TDto>(Expression<Func<TEntity, bool>> expression, CancellationToken ct = default);
}