Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
- name: Install .NET Core
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.x
dotnet-version: |
10.x
11.x

- name: Restore Dependencies
run: dotnet restore
Expand All @@ -46,7 +48,7 @@ jobs:
run: dotnet build --no-restore --configuration Release

- name: Run Test
run: dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --settings coverlet.runsettings
run: dotnet test --solution Foundatio.CommandQuery.slnx --no-build --configuration Release

- name: Create Packages
if: success() && github.event_name != 'pull_request'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
dotnet-version: |
10.0.x
11.0.x
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/samples/EntityFramework/Tracker.Host/bin/Debug/net9.0/Tracker.Host.dll",
"program": "${workspaceFolder}/samples/EntityFramework/Tracker.Host/bin/Debug/net10.0/Tracker.Host.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/EntityFramework/Tracker.Host",
"stopAtEntry": false,
Expand All @@ -26,7 +26,7 @@
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/samples/MongoDB/Tracker.Service/bin/Debug/net9.0/Tracker.WebService.dll",
"program": "${workspaceFolder}/samples/MongoDB/Tracker.Service/bin/Debug/net10.0/Tracker.WebService.dll",
"args": [],
"cwd": "${workspaceFolder}/samples/MongoDB/Tracker.Service",
"stopAtEntry": false,
Expand Down
26 changes: 13 additions & 13 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.5.4" />
<PackageVersion Include="Aspire.Hosting.AppHost" Version="13.6.5" />
<PackageVersion Include="AspNetCore.SecurityKey" Version="4.3.3" />
<PackageVersion Include="AssemblyMetadata.Generators" Version="2.2.0" />
<PackageVersion Include="AwesomeAssertions" Version="9.6.0" />
Expand All @@ -17,19 +17,19 @@
<PackageVersion Include="Foundatio.Mediator.Abstractions" Version="1.3.3" />
<PackageVersion Include="Injectio" Version="6.2.0" />
<PackageVersion Include="LoreSoft.Blazor.Controls" Version="13.10.0" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.12" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="10.0.12" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.12" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.12" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.1" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.12" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.15" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="10.0.15" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.15" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.15" />
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.15" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Caching.Hybrid" Version="10.10.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.12" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.15" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.10.0" />
<PackageVersion Include="Microsoft.Identity.Web" Version="4.15.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.12.0" />
Expand Down
10 changes: 10 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestMajor",
"allowPrerelease": false
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Foundatio.Mediator.Abstractions" VersionOverride="1.0.0-rc.5.4" />
<PackageReference Include="Foundatio.Mediator.Abstractions" />
<ProjectReference Include="..\..\..\src\Foundatio.CommandQuery\Foundatio.CommandQuery.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Dispatcher implementation for Command Query Responsibility Segregation (CQRS) framework providing centralized command and query handling with caching support</Description>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Http" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" VersionOverride="10.0.15" />
<PackageReference Include="Microsoft.Extensions.Http" VersionOverride="10.0.15" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" VersionOverride="9.0.11" />
<PackageReference Include="Microsoft.Extensions.Http" VersionOverride="9.0.11" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" VersionOverride="9.0.11" />
<PackageReference Include="Microsoft.Extensions.Http" VersionOverride="9.0.11" />
<ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" VersionOverride="11.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" VersionOverride="11.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>ASP.NET Core Minimal API endpoints for Command Query Responsibility Segregation (CQRS) framework providing HTTP-based command and query execution</Description>
Expand Down
12 changes: 1 addition & 11 deletions src/Foundatio.CommandQuery.Endpoints/ProblemDetailsCustomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,12 @@ public static void CustomizeProblemDetails(ProblemDetailsContext context)

private static Exception? GetException(ProblemDetailsContext context)
{
#if NET8_0_OR_GREATER
var exception = context.Exception;
#else
var feature = context.HttpContext.Features.Get<IExceptionHandlerFeature>();
var exception = feature?.Error;
#endif
return exception;
return context.Exception;
}

private static void AddValidationErrors(ProblemDetailsContext context, IDictionary<string, string[]> errors)
{
#if NET8_0_OR_GREATER
context.ProblemDetails = new HttpValidationProblemDetails(errors);
#else
context.ProblemDetails.Extensions.Add("errors", errors);
#endif
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Entity Framework Core integration for Command Query Responsibility Segregation (CQRS) framework providing database query and persistence handlers with dynamic LINQ support</Description>
Expand All @@ -12,15 +12,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" />
<PackageReference Include="Microsoft.EntityFrameworkCore" VersionOverride="10.0.15" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" VersionOverride="9.0.11" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" VersionOverride="9.0.11" />
<ItemGroup Condition="'$(TargetFramework)' == 'net11.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" VersionOverride="11.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>MongoDB integration for Command Query Responsibility Segregation (CQRS) framework providing NoSQL database query and persistence handlers with dynamic LINQ support</Description>
Expand Down
2 changes: 1 addition & 1 deletion src/Foundatio.CommandQuery/Foundatio.CommandQuery.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
<TargetFrameworks>net10.0;net11.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>Core abstractions and base classes for implementing Command Query Responsibility Segregation (CQRS) patterns using the mediator pattern</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void JsonSerialization_SerializedJsonHasCorrectStructure()
json.Should().Contain("\"model\":");
json.Should().Contain($"\"id\":\"structure-test\"");
json.Should().Contain("CreateEntity"); // Just check that the type name contains the command name
json.Should().Contain("EntityCreateModel"); // And the model type
json.Should().Contain("CreateModel"); // And the model type
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;

[assembly: MediatorConfiguration(EndpointDiscovery = EndpointDiscovery.None)]

namespace Foundatio.CommandQuery.Endpoints.Tests;

public class EntityCommandEndpointBaseTests
Expand Down
Loading