70 Commits

Author SHA1 Message Date
Developer 02
a0696c5e22 feat(Application.Abstraction): Erstellt, um Schnittstellen von Core.Application zu behandeln 2025-05-20 16:30:31 +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
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
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
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
3a1aeb7ac3 Refactor namespaces and enhance application structure
This commit reorganizes namespaces from `DigitalData.Core.Abstractions` and `DigitalData.Core.DTO` to `DigitalData.Core.Application.Interfaces` and `DigitalData.Core.Application.DTO`, improving maintainability and clarity.

Updated using directives across multiple files to reflect the new structure, ensuring functionality remains intact.

Project references in `DigitalData.Core.API.csproj` have been consolidated to include the new Application project.

Introduced new classes and interfaces such as `BaseDTO`, `CookieConsentSettings`, `DataResult`, `Notice`, and `Result` to enhance data transfer and service result handling.

Updated `IRepository`, `ICRUDRepository`, and `IEntityMapper` interfaces to facilitate CRUD operations and entity mapping.

Added extension methods in `Extensions.cs` to improve repository usability.

New interfaces for HTTP client services have been added, enhancing external API call handling.

Overall, these changes reflect a significant restructuring aimed at improving organization and preparing for future development.
2025-05-16 11:24:58 +02:00
Developer 02
fb9449d701 chore: upradge versions 2025-04-22 23:05:04 +02:00
Developer 02
72f735272f feat(Repository): Add and implement ReadOrDefaultAsync method.
- add read method can map for each
2025-04-22 23:04:11 +02:00
Developer 02
e67361bfe1 chore(DigitalData.Core.Infrastructure): Hochgestuft auf 2.0.2 2025-04-22 18:00:29 +02:00
Developer 02
91594e80bf refactor(EntityConfigurationOptions): aktualisiert, um IServiceCollection mit Callback zu konfigurieren 2025-04-22 17:58:49 +02:00
Developer 02
8d98159ba8 fix: Korrektur der Update- und Löschlogik in DbRepository zur Vermeidung von Laufzeitproblemen 2025-04-22 17:33:55 +02:00
Developer 02
f1f5b9e16d refactor(DbRepositoryTests): Update AddDbRepository configuration 2025-04-22 16:32:17 +02:00
Developer 02
3955dede16 feat(EntityConfigurationOptions): Erstellt, um Entitäten wie Mapper konfigurieren zu können 2025-04-22 16:21:57 +02:00
Developer 02
3c1bbc1151 feat(Repository): CreateAsync-Methoden für DTO wurden in Erweiterungsmethoden konvertiert 2025-04-22 11:21:21 +02:00
Developer 02
5465fe5b49 feat(IEntityMapper): Erstellt, um Mapper zu abstrahieren.
- Integriert in IRepository und Repository
2025-04-22 11:10:55 +02:00
Developer 02
85787e7054 feat(DbRepositoryTests): ReadAsync_ShouldReturnUpdated und ReadAsync_ShouldNotReturnDeleted Tests 2025-04-22 10:09:47 +02:00
Developer 02
561a751de4 Update dependency injection and repository tests
Modified `AddDbRepository` method to allow broader entity types and registered `queryFactory` as a singleton. Added necessary using directives in `DbRepositoryTests.cs` and updated the `Setup` method to configure an in-memory database for testing with `MockDbContext` and `User` entity.
2025-04-17 15:05:23 +02:00
Developer 02
f5b202c325 Enhance IRepository and DbRepository with DTO support
Updated IRepository<TEntity> to include new generic methods for creating and reading entities from DTOs. Modified UpdateAsync to accept DTOs instead of generic types. Implemented corresponding methods in DbRepository<TDbContext, TEntity> for mapping DTOs to entities during creation and updating processes.
2025-04-17 13:30:35 +02:00
Developer 02
fffbdf752f Revert "Add mapping methods to IRepository and DbRepository"
This reverts commit 6916e169b17fc22997f3fed178863f2e1ed5d059.
2025-04-17 13:15:22 +02:00
Developer 02
6916e169b1 Add mapping methods to IRepository and DbRepository
Updated the `IRepository<TEntity>` interface to include two new mapping methods: `Map<TSource>(TSource source)` and `Map<TDto>(TEntity source)`.

Implemented these methods in the `DbRepository<TDbContext, TEntity>` class, utilizing a `Mapper` for conversions between source types and entity types, as well as between entity types and DTOs.
2025-04-17 13:01:51 +02:00
Developer 02
0c529b199b 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`.
2025-04-17 12:53:40 +02:00
Developer 02
5427a9722d Update package references and modify DbRepository access
- Added conditional package references for AutoMapper in
  `DigitalData.Core.Application.csproj` to support
  different target framework versions.

- Changed `DbRepository` class access modifier from
  `public` to `internal` to encapsulate implementation
  details within the current assembly.
2025-04-16 13:56:53 +02:00
Developer 02
bccfae59cd Update EntityFrameworkCore references for multiple frameworks
The project file `DigitalData.Core.Infrastructure.csproj` has been modified to include conditional `PackageReference` entries for different target frameworks. The previous reference to `Microsoft.EntityFrameworkCore` version `7.0.16` has been replaced with:
- version `7.0.20` for `net7.0`
- version `8.0.15` for `net8.0`
- version `9.0.4` for `net9.0`

This change ensures the project uses the appropriate version of Entity Framework Core based on the target framework.
2025-04-16 13:51:04 +02:00
Developer 02
4c55ecb427 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.
2025-04-16 09:42:55 +02:00
Developer 02
a7e4291e42 Enhance DbRepository with AutoMapper integration
Added AutoMapper support by introducing an IMapper field.
Changed Context and Entities fields to readonly for better
encapsulation. Updated constructor to accept an IMapper
parameter, improving object mapping capabilities.
2025-04-16 09:39:14 +02:00
Developer 02
352b59dfdf Refactor IRepository to simplify CreateAsync methods
Updated IRepository<TEntity> to remove generic type parameters
from CreateAsync methods, now directly accepting TEntity.
Corresponding changes made in DbRepository to align method
signatures. Implementations still throw NotImplementedException.
2025-04-16 09:38:07 +02:00
Developer 02
1b793e2b75 Add CancellationToken support to IRepository methods
Updated the IRepository<TEntity> interface to include an optional CancellationToken parameter in the asynchronous methods: CreateAsync, ReadAsync, UpdateAsync, and DeleteAsync. Modified the DbRepository<TDbContext, TEntity> class to align with these changes, ensuring method signatures are consistent with the interface.
2025-04-16 09:17:38 +02:00
Developer 02
72603f836c Refactor repository pattern and dependency injection
This commit introduces a new `DbRepository` class implementing the `IRepository<TEntity>` interface, providing asynchronous methods for CRUD operations. The previous CRUD repository registration in `DIExtensions.cs` has been removed, indicating a shift in repository management. A new static class `DependencyInjection` has been added to facilitate the registration of `DbRepository` with the service collection, enhancing modularity and flexibility in database interactions.
2025-04-16 09:12:06 +02:00
Developer 02
c0524cbca2 Update target frameworks to include .NET 9.0
Updated multiple project files to support .NET 9.0 alongside .NET 7.0 and .NET 8.0. Affected files include:
- DigitalData.Core.API.csproj
- DigitalData.Core.Abstractions.csproj
- DigitalData.Core.Application.csproj
- DigitalData.Core.Client.csproj
- DigitalData.Core.DTO.csproj
- DigitalData.Core.Infrastructure.csproj

This change enables the use of new features and improvements in .NET 9.0.
2025-04-15 16:19:23 +02:00
Developer 02
92a7b959ab chore: unnötige Dateien entfernt und git ignore aktualisiert. 2025-01-16 22:38:05 +01:00
Developer 02
0169097671 Chore: Hinzufügen des .net 8-Frameworks zu allen .net-Projekten.
- Zentralisierte Nuget-Symbole.
 - Entfernte Projekte gelöscht.
2024-11-19 19:21:40 +01:00
Developer 02
96d03a5f59 chore: NuGet-Paketversionen für Application-, Infrastructure-, DTO- und Abstractions-Ebenen aktualisiert
- Version von 1.0.1.1 auf 2.0.0.0 für Application-, Infrastructure-, DTO- und Abstractions-Projekte aktualisiert.
2024-09-16 09:13:44 +02:00
Developer 02
0bf8979a09 refactor: Einführung des IUnique<TId>-Interfaces für Entitäten und DTOs
- Aktualisiertes IBasicCRUDService-Interface, um Konsistenz bei einzigartigen Identifikatoren mit IUnique<TId> durchzusetzen
- DIExtensions-Methoden angepasst, um IUnique<TId>-Einschränkungen für DTOs und Entitäten einzuschließen
2024-09-13 16:30:52 +02:00
Developer 02
406a41b91f feat: CountAsync-Methode zum Repository-Interface und zur Implementierung hinzugefügt
Eine neue asynchrone CountAsync-Methode wurde zum Repository-Interface und zur Implementierung hinzugefügt. Diese Methode zählt die Anzahl der Entitäten mit einer bestimmten ID in der Datenbank.
2024-09-11 10:52:56 +02:00
Developer 02
ed2a591317 refactor: Kommentar zur Dokumentation aktualisieren 2024-09-11 09:57:42 +02:00
Developer 02
f6d5305c22 fix: CRUDRepository Konstruktor aktualisiert, um DbSet<TEntity> als Parameter zu akzeptieren
- `CRUDRepository` Konstruktor geändert, um `DbSet<TEntity>` direkt zu akzeptieren.
- Erlaubt flexible Handhabung von `DbSet`-Instanzen beim Erstellen des Repositories.
2024-09-11 09:56:04 +02:00
Developer 02
a6230419d8 refactor: ICRUDService, CRUDService, CRUDRepository und ICRUDRepository um IUnique<TId> Einschränkung zu erzwingen
- `IUnique<TId>` Einschränkung zu `TEntity` in den Schnittstellen `ICRUDService`, `CRUDService`, `ICRUDRepository` und `CRUDRepository` hinzugefügt.
- Relevanten Code aktualisiert, um die neue Einschränkung zu berücksichtigen und sicherzustellen, dass Entitäten `IUnique<TId>` implementieren.
2024-09-11 09:54:26 +02:00
Developer 02
58d879aec5 Revert "feat: Hinzufügen des IUnique<T>-Interfaces zur Implementierung einer eindeutigen Kennung"
This reverts commit c9d07ce7bfd52015c273dd40dc56b3e5059ba3f8.
2024-09-11 09:24:48 +02:00
Developer 02
c9d07ce7bf feat: Hinzufügen des IUnique<T>-Interfaces zur Implementierung einer eindeutigen Kennung 2024-09-11 09:22:48 +02:00
Developer 02
bb39b97d1e refactor: Umbenennung der ReadAll-Methode in ReadOnly im CRUDRepository 2024-09-10 11:21:21 +02:00
Developer 02
ee5668a5cb feat: ReadAll-Methode in ICRUDRepository und CRUDRepository implementieren
- ReadAll-Methode zur ICRUDRepository-Schnittstelle hinzugefügt, um die Abfrage aller Entitäten zu ermöglichen.
- ReadAll-Methode in der CRUDRepository-Klasse implementiert, um IQueryable<TEntity> für weitere Abfragen und Filterung bereitzustellen.
2024-09-09 17:44:18 +02:00
Developer 02
2cb80ec119 Projektversion 'Infrastruktur' von 1.0.1 auf 1.0.1.1.1 erhöht 2024-07-01 15:57:27 +02:00
Developer 02
0ad92e7592 Kommentare zur Dokumentation hinzugefügt und Pakete konfiguriert. 2024-06-20 16:20:50 +02:00
Developer 02
b7584a1632 Aktualisierter Gitignore. 2024-06-20 15:12:13 +02:00
Developer 02
316847a11b Gitignore aktualisieren 2024-06-20 14:00:32 +02:00
Developer 02
58e86e1405 Refaktorieren: Projektname von "Contracts" zu "Abstractions" geändert, um den Zweck besser widerzuspiegeln. 2024-06-20 12:17:30 +02:00
Developer 02
4b71836fea Erweiterung der DTOs und Implementierung der Lokalisierungsdienste
- Neue DTO-Extension-Methoden hinzugefügt, um die Verarbeitung und Zuweisung von Nachrichten und Benachrichtigungen in Ergebnisobjekten zu vereinfachen.
- Lokalisierungsunterstützung in der API-Schicht implementiert, einschließlich Cookie-basierter Lokalisierung und Konfiguration unterstützter Kulturen.
- Die Integration von StringLocalizer in die API-Schicht wurde durchgeführt, um eine nahtlose Mehrsprachigkeit zu ermöglichen.
- Fehlerbehandlung für fehlende Konfigurationseinstellungen verbessert.

Die Änderungen verbessern die Flexibilität und Wartbarkeit des Codes und unterstützen eine effizientere Internationalisierung der Anwendung.
2024-04-30 17:01:26 +02:00
Developer 02
f6d8721c27 Aktualisierte .gitignore 2024-04-30 11:24:21 +02:00
Developer 02
1281d37239 Stage commit 2024-04-29 13:31:07 +02:00
Developer 02
70088fe42a Add Translation Extensions Methoden. 2024-04-26 10:24:44 +02:00