Add conditional compilation for .NET Framework support

Updated code to support conditional compilation for .NET Framework and .NET.
Introduced nullable reference types in `DbRepository.cs` and ensured proper initialization of service registration queues in `DependencyInjection.cs`.
Modified `DbRepositoryFactory.cs` and `DbSetFactory.cs` to maintain consistent structure across frameworks.
These changes enhance compatibility and improve type safety.
This commit is contained in:
Developer 02
2025-09-30 18:36:15 +02:00
parent e0ca11ffc0
commit 05568b1551
4 changed files with 111 additions and 19 deletions

View File

@@ -1,6 +1,14 @@
using Microsoft.EntityFrameworkCore;
#if NETFRAMEWORK
using System;
#endif
namespace DigitalData.Core.Infrastructure.Factory;
namespace DigitalData.Core.Infrastructure.Factory
#if NET
;
#elif NETFRAMEWORK
{
#endif
public class DbSetFactory<TDbContext,TEntity> where TDbContext : DbContext where TEntity : class
{
@@ -10,4 +18,8 @@ public class DbSetFactory<TDbContext,TEntity> where TDbContext : DbContext where
{
Create = create;
}
}
}
#if NETFRAMEWORK
}
#endif