OData support. :)

This commit is contained in:
David Lebee
2021-02-05 13:06:34 -05:00
parent 764f4a7cd6
commit 7a67866dc3
12 changed files with 259 additions and 2 deletions
+2
View File
@@ -7,6 +7,7 @@
<ItemGroup>
<PackageReference Include="FluentValidation.AspNetCore" Version="9.5.0" />
<PackageReference Include="HotChocolate.AspNetCore" Version="11.0.9" />
<PackageReference Include="Microsoft.AspNetCore.OData" Version="7.5.5" />
<PackageReference Include="PoweredSoft.Data" Version="2.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.6.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="5.6.3" />
@@ -14,6 +15,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PoweredSoft.CQRS.AspNetCore.OData\PoweredSoft.CQRS.AspNetCore.OData.csproj" />
<ProjectReference Include="..\PoweredSoft.CQRS.AspNetCore\PoweredSoft.CQRS.AspNetCore.csproj" />
<ProjectReference Include="..\PoweredSoft.CQRS.DynamicQuery.Abstractions\PoweredSoft.CQRS.DynamicQuery.Abstractions.csproj" />
<ProjectReference Include="..\PoweredSoft.CQRS.DynamicQuery.AspNetCore\PoweredSoft.CQRS.DynamicQuery.AspNetCore.csproj" />
+8 -2
View File
@@ -24,6 +24,7 @@ using System.Linq;
using PoweredSoft.CQRS.GraphQL.HotChocolate.DynamicQuery;
using PoweredSoft.CQRS.Abstractions.Security;
using Demo.Security;
using Microsoft.AspNet.OData.Extensions;
namespace Demo
{
@@ -50,14 +51,15 @@ namespace Demo
services.AddPoweredSoftDataServices();
services.AddPoweredSoftDynamicQuery();
services
.AddPoweredSoftCQRS();
services.AddPoweredSoftCQRS();
services.AddOData();
services
.AddControllers()
.AddPoweredSoftQueries()
.AddPoweredSoftCommands()
.AddPoweredSoftDynamicQueries()
.AddPoweredSoftODataQueries()
.AddFluentValidation();
services
@@ -128,6 +130,10 @@ namespace Demo
{
endpoints.MapControllers();
endpoints.MapGraphQL();
endpoints.Select().Filter().OrderBy().Count().MaxTop(10);
endpoints.MapODataRoute("odata", "odata", endpoints.GetPoweredSoftODataEdmModel());
});
}
}