- Added `RegisterAllServices` method to centralize service registration
- Introduced `RegsDbSetFactory` queue for custom DbSetFactory registrations
- Extended `RegisterEntity` to support optional DbSetFactory
- Added `RegisterDbSetFactory` for explicit DbSetFactory registration
- Registered `IRepositoryFactory` with `DbRepositoryFactory` in DI
- Introduced AddDbSetFactory to support DbSet factory registration for entities.
- Updated RepositoryConfiguration.RegisterFromAssembly to register both repositories and DbSet factories.
- Changed RegisterFromAssembly and RegisterEntity to void methods instead of fluent interface.
- Extracted DbRepositoryFactory into its own Factory namespace for better separation of concerns.
- Replaced `AddDbRepository<TDbContext, TEntity>` with `AddDbRepository(Action<RepositoryConfiguration>)` for more flexible DI registration.
- Added `RepositoryConfiguration` class to support:
- Registering repositories from an assembly (`RegisterFromAssembly`)
- Registering individual entities (`RegisterEntity`)
- Queues (`RegsFromAssembly` and `RegsEntity`) are used to defer registration until `InvokeAll` is called.
- Allows overriding and scanning multiple entities dynamically instead of static generic method.
- Renamed `Read()` to `Where()` and `ReadOnly()` to `Get()` for clarity.
- Marked old `Read()` and `ReadOnly()` methods as `[Obsolete]` with guidance to use the new methods.
- Updated XML region to separate obsolete methods for better maintainability.
- Added regions for Create, Update, and Delete for better structure
- Introduced `Where` extension for IRepository
- Added batch `CreateAsync` overloads for entities and DTOs
- Improved readability and consistency across IRepository extension methods
- Added extensions for IRepository to support Get, Create, Update, and Delete operations.
- Maintains existing IRepository<TEntity> CreateAsync methods for DTO mapping.
- Improves consistency and usability across repository abstractions.
- Replaced `Read()` with `Where()` and `ReadOnly()` with `Get()` in `IRepository<TEntity>`
- Marked `Read()` and `ReadOnly()` as `[Obsolete]` with guidance for the new methods
- Added non-generic `IRepository` interface with `Entity<TEntity>()` method
Changed UpdateAsync and DeleteAsync to accept Func<IQueryable<TEntity>, IQueryable<TEntity>> instead of IQueryable<TEntity>
Improved flexibility by allowing callers to compose queries dynamically
Updated overloads to wrap expressions with q => q.Where(expression) for compatibility
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.
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.
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.
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.
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.
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.
- 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`.
- 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`.
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.
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.
Updated versioning information in `DigitalData.Core.Abstractions.csproj` from 3.6.0 to 4.0.0, including changes to `<Version>`, `<AssemblyVersion>`, and `<FileVersion>`.
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.