543 Commits

Author SHA1 Message Date
e80eb6aa1f rename CancellationTokens 2025-08-25 14:32:38 +02:00
70e3fe5dd7 Refactor(DbRepository): Add IQueryable overloads for UpdateAsync and DeleteAsync
- Added UpdateAsync<TDto>(TDto dto, IQueryable<TEntity> query, ...) overload
- Added DeleteAsync(IQueryable<TEntity> query, ...) overload
- Expression-based methods now delegate to the IQueryable overloads
- Reduces code duplication and allows more flexible queries
2025-08-25 14:27:55 +02:00
859c03177e Merge branch 'master' of http://git.dd:3000/AppStd/WebCoreModules 2025-08-21 18:21:59 +02:00
244ed3ebe4 chore: bump to related version 2025-08-21 18:21:00 +02:00
048ba35804 remove ReadQuery 2025-08-21 18:19:16 +02:00
Developer 02
9aa7673484 chore(Exceptions): Bump to 1.1.0 2025-08-05 19:37:46 +02:00
Developer 02
f01db9c2d7 feat(core): ForbiddenException hinzugefügt zur Behandlung von verbotenen Operationen 2025-08-05 19:36:44 +02:00
56cb3e247f fix(GlobalExceptionHandlerMiddleware): add await 2025-07-30 17:00:03 +02:00
0554cbf7bc refactor(API): upgrade auf 2.2.1 2025-07-30 15:43:45 +02:00
Developer 02
62e36f4459 refactor(DigitalData.Core.Infrastructure.AutoMapper): Upgrade 1.0.3 2025-05-27 18:36:32 +02:00
Developer 02
e09d40abc1 refactor(DigitalData.Core.Infrastructure.AutoMapper): Entfernen der Abhängigkeit von DigitalData.Core.Abstractions 2025-05-27 18:32:55 +02:00
Developer 02
9b286b023c refactor(Application.Abstractions): umbenennen in Abstractions.Application 2025-05-27 18:31:13 +02:00
Developer 02
0441f593d4 update project versions 2025-05-27 17:37:05 +02:00
Developer 02
7621d657ac refactor(DTO): Hinzufügen des Attributs Obsolete mit der Meldung „Use DigitalData.Core.Exceptions and .Middleware“ 2025-05-26 15:49:22 +02:00
Developer 02
e94efc8534 Aufrüstung auf 2.2.0 2025-05-26 15:24:27 +02:00
Developer 02
90db7a356a refactor(DigitalData.Core.API): Aktualisiert für aktuelle Application und Application.Abstraction 2025-05-26 13:55:41 +02:00
Developer 02
b6212fec55 chore(DigitalData.Core.Application.Abstraction): Build-Typ Release erstellen 2025-05-26 13:22:09 +02:00
Developer 02
63efde9e8a chore(DigitalData.Core.Application.Abstraction): Paketsymbol hinzufügen 2025-05-26 12:59:47 +02:00
Developer 02
0a9ba9be38 refactor(DigitalData.Core.Application): Aktualisiert auf 3.3.2 2025-05-26 12:52:10 +02:00
Developer 02
e05f1347f8 Enhance project metadata in .csproj file
Updated `DigitalData.Core.Application.Abstraction.csproj` to include new properties in the `<PropertyGroup>`, such as package generation, description, package ID, authors, company, product name, copyright, package icon, repository URL, tags, and versioning information. This improves project metadata and compliance with package management standards.
2025-05-26 12:47:07 +02:00
Developer 02
a0696c5e22 feat(Application.Abstraction): Erstellt, um Schnittstellen von Core.Application zu behandeln 2025-05-20 16:30:31 +02:00
Developer 02
01025ff36f refactor: update efcore 2025-05-20 16:14:52 +02:00
Developer 02
831f91ce16 Update EntityFrameworkCore to version 9.0.5
Updated the `Microsoft.EntityFrameworkCore` package version
from `9.0.4` to `9.0.5` for the target framework `net9.0`
in the `DigitalData.Core.Infrastructure.csproj` file.
2025-05-20 12:47:49 +02:00
Developer 02
980e21f27f Bump version to 3.3.1 in project file
Updated the version number, assembly version, and file version for the DigitalData.Core.Application project from 3.3.0 to 3.3.1 in DigitalData.Core.Application.csproj.
2025-05-20 12:44:54 +02:00
Developer 02
d49aaf61dc Update CreateAsync to return DataResult<TReadDto>
Modified the CreateAsync method in CRUDService.cs and ICRUDService.cs to change the return type from DataResult<TId> to DataResult<TReadDto>. The implementation now maps the created entity to a read DTO, providing the caller with the complete entity representation instead of just its ID.
2025-05-20 12:44:43 +02:00
Developer 02
b95baaef5f Enforce ID retrieval in UpdateAsync method
Updated the `UpdateAsync<TUpdateDto>` method in `CRUDService.cs` to replace the use of `GetIdOrDefault<TId>()` with `GetId<TId>()`. This change ensures that an ID must be present in the `updateDto`, enhancing the reliability of the update process.
2025-05-20 12:38:03 +02:00
Developer 02
68d78afafe Refactor GetId method and update ICRUDService comments
Modified the `GetId<TId>` method in the `EntityExtensions` class to change its return type from nullable `TId?` to non-nullable `TId`, ensuring stricter type safety by throwing an `InvalidOperationException` when the `Id` property is not readable.

Removed a summary comment in the `ICRUDService` interface related to the `CreateAsync` method, which may indicate ongoing documentation updates for clarity on the method's functionality and parameters.
2025-05-20 12:37:36 +02:00
Developer 02
dd679b79b4 Update target frameworks and version to 2.1.0
- Added support for net8.0 and net9.0 frameworks.
- Incremented package, assembly, and file versions to 2.1.0.
- Updated `Microsoft.Extensions.Options` to 7.0.1 for net7.0, 8.0.2 for net8.0, and 9.0.5 for net9.0.
- Updated `Microsoft.Extensions.Options.ConfigurationExtensions` to 8.0.0 for net8.0 and 9.0.5 for net9.0.
- Maintained existing project reference to `DigitalData.Core.Abstractions.csproj`.
2025-05-20 11:37:03 +02:00
Developer 02
cc2177e6d1 Update package for net9.0 and version 2.1.0
- Added net9.0 to target frameworks.
- Updated package description to reference DigitalData.Core.Application.
- Incremented version to 2.1.0 for package, assembly, and file versions.
- Changed package icon path to `..\Assets\core_icon.png`.
2025-05-20 10:56:49 +02:00
Developer 02
94ff231a71 Update project file and increment version to 3.3.0
- Added target frameworks: net7.0, net8.0, net9.0
- Shortened package description
- Updated versioning from 3.2.1 to 3.3.0
- Changed package icon path to ../Assets/core_icon.png
2025-05-20 10:50:28 +02:00
Developer 02
5e2ebd07db Update NuGet package description for clarity
Modified the description in the `DigitalData.Core.Abstractions.csproj` file to provide a more concise statement about the package, removing details about Clean Architecture principles.
2025-05-20 10:44:56 +02:00
Developer 02
43e714b061 Update package references by target framework version
Modified `DigitalData.Core.Abstractions.csproj` to conditionally include package references for `Microsoft.Extensions.Caching.Memory` and `Microsoft.Extensions.Configuration.Binder` based on the target framework (`net7.0`, `net8.0`, `net9.0`). This change enhances compatibility and version management for different .NET versions.
2025-05-20 10:44:28 +02:00
Developer 02
7a7f564f82 Bump version to 4.0.0 in project file
Updated versioning information in `DigitalData.Core.Abstractions.csproj` from 3.6.0 to 4.0.0, including changes to `<Version>`, `<AssemblyVersion>`, and `<FileVersion>`.
2025-05-20 10:36:20 +02:00
Developer 02
f7e2bb2434 Refactor repository pattern and mark methods obsolete
Updated `IRepository<TEntity>` to introduce new reading methods and mark existing ones as obsolete. The `CRUDRepository` class is now deprecated, encouraging a transition to alternative implementations. Significant changes in `DbRepository<TDbContext, TEntity>` include the removal of old read methods in favor of a new `Read` method returning `IReadQuery<TEntity>`. Added a `ReadQuery<TEntity>` class to enhance querying capabilities with a fluent API. Obsolete methods are organized under a `#region Obsolete` directive for better management.
2025-05-20 10:35:27 +02:00
Developer 02
5995b334eb Mark ICRUDRepository as obsolete
The ICRUDRepository interface has been marked as obsolete,
with an attribute advising users to use IRepository instead.
This change aims to direct developers towards a preferred
alternative for repository operations.
2025-05-20 10:20:42 +02:00
Developer 02
1b8dc29595 Enhance IRepository<TEntity> with new method overloads
- Added overload for CreateAsync to accept IEnumerable<TEntity>.
- Updated Read method to accept multiple expressions for flexible querying.
2025-05-20 10:11:39 +02:00
Developer 02
36c2c20eab Add CancellationToken support to IReadQuery methods
Updated the IReadQuery<TEntity> interface to include an optional CancellationToken parameter for the following asynchronous methods:
- FirstOrDefaultAsync
- SingleOrDefaultAsync
- ToListAsync
- FirstAsync
- SingleAsync

Documentation comments for these methods have also been updated to describe the new cancellation parameter and its purpose.
2025-05-20 10:10:16 +02:00
Developer 02
a7df79629d Refactor cancellation token parameter names
Updated parameter names from `ct` to `cancellation` in several asynchronous methods of the `IRepository<TEntity>` interface. This change improves code readability and clarity. Affected methods include `CreateAsync`, `UpdateAsync`, `DeleteAsync`, `ReadAllAsync`, `ReadOrDefaultAsync`, and their generic counterparts.
2025-05-20 10:07:42 +02:00
Developer 02
89a77019dc Enhance IRepository and add RepositoryExtensions
Updated the IRepository<TEntity> interface to include an overloaded CreateAsync method for handling multiple entities and removed the CancellationToken from the Read method. Introduced a new RepositoryExtensions class with a Where extension method to facilitate applying multiple filters to IReadQuery<TEntity> queries.
2025-05-20 10:05:57 +02:00
Developer 02
21c895c22b Enhance IRepository with async methods and deprecations
Updated the `IRepository<TEntity>` interface in `IRepository.cs` to include new asynchronous methods for reading, updating, and deleting entities. Added `Read`, `UpdateAsync`, and `DeleteAsync` methods while marking several existing methods as obsolete to encourage the use of the new `Read` method returning `IReadQuery<TEntity>`. Removed previous implementations of `UpdateAsync` and `DeleteAsync` for a more streamlined API.
2025-05-20 10:00:18 +02:00
Developer 02
4afeddb7f9 Enhance documentation and introduce IReadQuery interface
Updated XML documentation in ConfigurationExtension.cs for better clarity.
Removed the old implementation and retained the functionality of GetOrDefault<T>.

Introduced a new IReadQuery<TEntity> interface in IReadQuery.cs,
providing methods for both asynchronous and synchronous entity queries,
along with comprehensive documentation for each method.
2025-05-20 09:56:54 +02:00
Developer 02
14d00653d1 Update version to 1.0.1 and remove package references
Updated the versioning information in `DigitalData.Core.Exceptions.csproj` from `1.0.0` to `1.0.1` for `Version`, `AssemblyVersion`, and `FileVersion`. Removed package references for `Microsoft.AspNetCore.Http.Abstractions` version `2.3.0` and `Microsoft.Extensions.Logging.Abstractions` version `9.0.5`.
2025-05-19 17:14:14 +02:00
Developer 02
87e4c1414e Enhance ConfigureGlobalExceptionHandler method
Updated the `ConfigureGlobalExceptionHandler` method in the `DependencyInjection` class to include two optional parameters: `options` (nullable) and `addDefaultHandlers` (defaulting to true). The method now initializes `options` to a default action if null and adds default exception handlers when `addDefaultHandlers` is true, improving flexibility and usability.
2025-05-19 16:45:40 +02:00
Developer 02
fd8e976e1e Refactor HttpExceptionHandler to use properties
Changed DefaultBadRequest, DefaultNotFound, and Default
from readonly fields to properties for lazy evaluation,
enhancing performance and flexibility while maintaining
the same functionality.
2025-05-19 16:18:05 +02:00
Developer 02
2c393701e4 Add NuGet package metadata and asset inclusion
Updated `DigitalData.Core.Exceptions.Middleware.csproj` to include essential NuGet package metadata such as `PackageId`, `Authors`, `Description`, and versioning information. Added an `ItemGroup` for the `core_icon.png` asset to ensure it is packed with the NuGet package. Retained existing framework-specific references for `Microsoft.Extensions.Options` for `net7.0` and `net8.0`.
2025-05-19 16:09:45 +02:00
Developer 02
1d50fd8e5b Update NuGet metadata and project build configurations
Enhanced `DigitalData.Core.Exceptions.csproj` with NuGet package metadata including `PackageId`, `Authors`, `Description`, and versioning details. Added `core_icon.png` asset to the package.

Modified `DigitalData.Core.sln` to change project build configurations from `Debug` to `Release` for multiple projects.
2025-05-19 15:58:27 +02:00
Developer 02
701c34a251 Add assets project and update legacy icon
This commit introduces a new project named "assets" to the solution, which includes two assets: "core_icon.png" and "core_legacy_icon.png". Additionally, the file `core_legacy_icon.png` has been completely replaced with a new version, featuring a different binary structure and likely a new visual design.
2025-05-19 15:34:17 +02:00
Developer 02
63f914d188 Refactor CRUDRepository for improved flexibility
- Added using directives for new application interfaces.
- Removed constraint for IUnique<TId> from TEntity.
- Updated CountAsync method to use GetId() for identifier retrieval.
2025-05-19 15:27:08 +02:00
Developer 02
9ea2599553 Remove DependencyInjection class and global exception handler
The entire `DependencyInjection` class has been removed, including the `UseGlobalExceptionHandler` extension method and its associated `using` directive. This change eliminates the functionality for setting up global exception handling middleware in the application.
2025-05-19 15:25:59 +02:00
Developer 02
b8995da5ea Refactor global exception handling middleware
Updated `GlobalExceptionHandlerMiddleware.cs` to include
necessary using directives for logging and options handling.
Removed the `HandleExceptionAsync` method and replaced it
with a more extensible approach using a dictionary of
handlers for different exception types. Added logging for
unhandled exceptions to ensure proper error tracking.
2025-05-19 15:21:11 +02:00