Added a new `ECMJobRunner.Tests` project to the solution for unit testing, including build configurations for Debug and Release. Enhanced the `DependencyExtension` class to support dependency injection for both .NET Framework 4.8 (EF6) and .NET 8 (EF Core) using conditional compilation. Registered `JobRunnerDbContext` differently based on the target framework and added AutoMapper registration for both frameworks. Updated `ECMJobRunner.Infrastructure.csproj` to include new package references for DI and AutoMapper in .NET Framework 4.8. Improved code structure and readability by removing redundant directives and aligning DI patterns across frameworks.
40 lines
1.9 KiB
XML
40 lines
1.9 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<TargetFrameworks>net480;net8.0</TargetFrameworks>
|
|
<LangVersion>latest</LangVersion>
|
|
<Nullable>enable</Nullable>
|
|
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(MSBuildProjectName).xml</DocumentationFile>
|
|
<PackageId>ECMJobRunner.Infrastructure</PackageId>
|
|
<Authors>Digital Data GmbH</Authors>
|
|
<Company>Digital Data GmbH</Company>
|
|
<Product>ECMJobRunner.Infrastructure</Product>
|
|
<Copyright>Copyright 2026</Copyright>
|
|
<RepositoryUrl>http://git.dd:3000/AppStd/ECMJobRunner.git</RepositoryUrl>
|
|
<PackageTags>digital data ecm job runner infrastructure</PackageTags>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\ECMJobRunner.Domain\ECMJobRunner.Domain.csproj" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net480'">
|
|
<!-- Entity Framework 6 for .NET Framework 4.8 -->
|
|
<PackageReference Include="EntityFramework" Version="6.5.1" />
|
|
<!-- AutoMapper for .NET Framework 4.8 -->
|
|
<PackageReference Include="AutoMapper" Version="10.1.1" />
|
|
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
|
|
<!-- Dependency Injection for .NET Framework 4.8 -->
|
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
|
<!-- Entity Framework Core 8 for .NET 8 -->
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.11" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.11" />
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.11" />
|
|
<!-- AutoMapper for .NET 8 (includes DI extensions) -->
|
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
|
</ItemGroup>
|
|
</Project>
|