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:
@@ -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
|
||||
Reference in New Issue
Block a user