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

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.0
# Visual Studio Version 16
VisualStudioVersion = 16.0.29326.143
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PoweredSoft.DynamicQuery.Core", "PoweredSoft.DynamicQuery.Core\PoweredSoft.DynamicQuery.Core.csproj", "{E614658D-6852-4405-B5BE-3695C3E96B13}"
EndProject
@ -19,9 +19,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PoweredSoft.DynamicQuery.Te
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PoweredSoft.DynamicQuery.AspNetCore", "PoweredSoft.DynamicQuery.AspNetCore\PoweredSoft.DynamicQuery.AspNetCore.csproj", "{DF58BD18-AB47-4018-B1EA-D1118D93B408}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoweredSoft.DynamicQuery.System.Json", "PoweredSoft.DynamicQuery.System.Json\PoweredSoft.DynamicQuery.System.Json.csproj", "{9A196F3E-69F7-4D07-B635-451D3C94E8F9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PoweredSoft.DynamicQuery.NewtonsoftJson", "PoweredSoft.DynamicQuery.NewtonsoftJson\PoweredSoft.DynamicQuery.NewtonsoftJson.csproj", "{201D7ACB-E11A-47EE-80F6-3F6BFB947DCA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoweredSoft.DynamicQuery.NewtonsoftJson", "PoweredSoft.DynamicQuery.NewtonsoftJson\PoweredSoft.DynamicQuery.NewtonsoftJson.csproj", "{201D7ACB-E11A-47EE-80F6-3F6BFB947DCA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PoweredSoft.DynamicQuery.System.Text.Json", "PoweredSoft.DynamicQuery.System.Text.Json\PoweredSoft.DynamicQuery.System.Text.Json.csproj", "{552D67DD-AAB4-4D99-A067-08A593221C84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson", "PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson\PoweredSoft.DynamicQuery.AspNetCore.NewtonsoftJson.csproj", "{7BBEEE93-A3DB-443B-8254-E148AC9663EA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -49,14 +51,18 @@ Global
{DF58BD18-AB47-4018-B1EA-D1118D93B408}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF58BD18-AB47-4018-B1EA-D1118D93B408}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF58BD18-AB47-4018-B1EA-D1118D93B408}.Release|Any CPU.Build.0 = Release|Any CPU
{9A196F3E-69F7-4D07-B635-451D3C94E8F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9A196F3E-69F7-4D07-B635-451D3C94E8F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9A196F3E-69F7-4D07-B635-451D3C94E8F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9A196F3E-69F7-4D07-B635-451D3C94E8F9}.Release|Any CPU.Build.0 = Release|Any CPU
{201D7ACB-E11A-47EE-80F6-3F6BFB947DCA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{201D7ACB-E11A-47EE-80F6-3F6BFB947DCA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{201D7ACB-E11A-47EE-80F6-3F6BFB947DCA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{201D7ACB-E11A-47EE-80F6-3F6BFB947DCA}.Release|Any CPU.Build.0 = Release|Any CPU
{552D67DD-AAB4-4D99-A067-08A593221C84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{552D67DD-AAB4-4D99-A067-08A593221C84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{552D67DD-AAB4-4D99-A067-08A593221C84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{552D67DD-AAB4-4D99-A067-08A593221C84}.Release|Any CPU.Build.0 = Release|Any CPU
{7BBEEE93-A3DB-443B-8254-E148AC9663EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7BBEEE93-A3DB-443B-8254-E148AC9663EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7BBEEE93-A3DB-443B-8254-E148AC9663EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7BBEEE93-A3DB-443B-8254-E148AC9663EA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -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;
}
}
}

View File

@ -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>

View File

@ -22,11 +22,6 @@
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PoweredSoft.DynamicQuery.Core\PoweredSoft.DynamicQuery.Core.csproj" />
<ProjectReference Include="..\PoweredSoft.DynamicQuery\PoweredSoft.DynamicQuery.csproj" />

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace PoweredSoft.DynamicQuery.AspNetCore.Json
namespace PoweredSoft.DynamicQuery.NewtonsoftJson
{
public class DynamicQueryJsonConverter : JsonConverter
{

View File

@ -1,7 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PoweredSoft.DynamicQuery.AspNetCore.Json;
using System;
namespace PoweredSoft.DynamicQuery.NewtonsoftJson

View File

@ -2,6 +2,18 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Copyright>Powered Softwares Inc.</Copyright>
<PackageLicenseUrl>MIT</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/PoweredSoft/DynamicQuery</PackageProjectUrl>
<RepositoryUrl>https://github.com/PoweredSoft/DynamicQuery.Core/</RepositoryUrl>
<RepositoryType>github</RepositoryType>
<PackageTags>powered,soft,dynamic,criteria,query,builder</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>
<PackageId>PoweredSoft.DynamicQuery.Newtonsoft.Json</PackageId>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Company>Poweredsoft</Company>
<Authors>David Lebee</Authors>
</PropertyGroup>
<ItemGroup>

View File

@ -1,11 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,23 @@
<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.Core/</RepositoryUrl>
<RepositoryType>github</RepositoryType>
<PackageTags>powered,soft,dynamic,criteria,query,builder</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>
<PackageId>PoweredSoft.DynamicQuery.System.Text.Json</PackageId>
<PackageRequireLicenseAcceptance>False</PackageRequireLicenseAcceptance>
<Company>Poweredsoft</Company>
<Authors>David Lebee</Authors>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\PoweredSoft.DynamicQuery.Core\PoweredSoft.DynamicQuery.Core.csproj" />
</ItemGroup>
</Project>