json net support is ready, waiting on ms for support of json converter from interfaces.

This commit is contained in:
David Lebee
2019-10-13 15:15:07 -05:00
parent 19858764a3
commit 707ef3178e
9 changed files with 102 additions and 26 deletions
@@ -0,0 +1,19 @@
using Microsoft.Extensions.DependencyInjection;
using PoweredSoft.DynamicQuery.NewtonsoftJson;
namespace PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson
{
public static class MvcBuilderExtensions
{
public static IMvcBuilder AddPoweredSoftJsonNetDynamicQuery(this IMvcBuilder mvcBuilder, bool enableStringEnumConverter = true)
{
mvcBuilder.AddPoweredSoftDynamicQuery();
var serviceProvider = mvcBuilder.Services.BuildServiceProvider();
mvcBuilder.AddNewtonsoftJson(o =>
{
o.SerializerSettings.AddPoweredSoftDynamicQueryNewtonsoftJson(serviceProvider, enableStringEnumConverter: enableStringEnumConverter);
});
return mvcBuilder;
}
}
}
@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<Copyright>Powered Softwares Inc.</Copyright>
<PackageLicenseUrl>MIT</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/PoweredSoft/DynamicQuery</PackageProjectUrl>
<RepositoryUrl>https://github.com/PoweredSoft/DynamicQuery</RepositoryUrl>
<RepositoryType>github</RepositoryType>
<PackageTags>powered,soft,dynamic,criteria,query,builder,asp,net,core</PackageTags>
<Version>2.1.0$(VersionSuffix)</Version>
<PackageIconUrl>https://secure.gravatar.com/avatar/4e32f73820c16718909a06c2927f1f8b?s=512&amp;amp;r=g&amp;amp;d=retro</PackageIconUrl>
<Description>This projects makes it easier to use dynamic query in a asp.net core mvc project.</Description>
<PackageId>PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson</PackageId>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Company>Powered Soft</Company>
<Authors>David Lebee</Authors>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PoweredSoft.DynamicQuery.AspNetCore\PoweredSoft.DynamicQuery.AspNetCore.csproj" />
<ProjectReference Include="..\PoweredSoft.DynamicQuery.NewtonsoftJson\PoweredSoft.DynamicQuery.NewtonsoftJson.csproj" />
</ItemGroup>
</Project>