Skip to content

Commit

Permalink
v5.7.2 (#231)
Browse files Browse the repository at this point in the history
* Fix Entity.HttpAgentCustomMapper

* Re-gen demo.
  • Loading branch information
chullybun authored Dec 16, 2023
1 parent 82caaf1 commit 0bb5203
Show file tree
Hide file tree
Showing 31 changed files with 63 additions and 45 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Represents the **NuGet** versions.

## v5.7.2
- *Fixed:* The `Entity.HttpAgentCustomMapper` property has been added to the schema for correctly include within code-generation.
- *Fixed:* Upgraded `CoreEx` (`v3.7.0`) to include all related fixes and improvements.

## v5.7.1
- *Fixed:* All related package dependencies updated to latest.

Expand Down
2 changes: 1 addition & 1 deletion Common.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>5.7.1</Version>
<Version>5.7.2</Version>
<LangVersion>preview</LangVersion>
<Authors>Avanade</Authors>
<Company>Avanade</Company>
Expand Down
1 change: 1 addition & 0 deletions docs/Entity-Entity-Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ Property | Description
**`odataModel`** | The corresponding OData model name (required where `AutoImplement` is `OData`).
**`odataCollectionName`** | The name of the underlying OData collection where `AutoImplement` is `OData`.<br/>&dagger; The underlying `Simple.OData.Client` will attempt to infer.
`odataCustomMapper` | Indicates that a custom OData `Mapper` will be used; i.e. not generated.<br/>&dagger; Otherwise, by default, a `Mapper` will be generated.
`httpAgentCustomMapper` | Indicates that a custom HTTP Agent `Mapper` will be used; i.e. not generated.<br/>&dagger; Otherwise, by default, a `Mapper` will be generated.

<br/>

Expand Down
2 changes: 1 addition & 1 deletion samples/Cdr.Banking/Cdr.Banking.Api/Cdr.Banking.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx.AspNetCore" Version="3.6.3" />
<PackageReference Include="CoreEx.AspNetCore" Version="3.7.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Folder Include="DataSvc\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CoreEx.Cosmos" Version="3.6.2" />
<PackageReference Include="CoreEx.Validation" Version="3.6.3" />
<PackageReference Include="CoreEx.Cosmos" Version="3.7.0" />
<PackageReference Include="CoreEx.Validation" Version="3.7.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
<Folder Include="Entities\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.6.3" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Demo/Beef.Demo.Api/Beef.Demo.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CoreEx.AspNetCore" Version="3.6.3" />
<PackageReference Include="CoreEx.AspNetCore" Version="3.7.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
</ItemGroup>
Expand Down
14 changes: 7 additions & 7 deletions samples/Demo/Beef.Demo.Business/Beef.Demo.Business.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx.Cosmos" Version="3.6.2" />
<PackageReference Include="CoreEx.Database" Version="3.6.3" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.6.3" />
<PackageReference Include="CoreEx.EntityFrameworkCore" Version="3.6.3" />
<PackageReference Include="CoreEx.Validation" Version="3.6.3" />
<PackageReference Include="CoreEx.FluentValidation" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
<PackageReference Include="CoreEx.Cosmos" Version="3.7.0" />
<PackageReference Include="CoreEx.Database" Version="3.7.0" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.7.0" />
<PackageReference Include="CoreEx.EntityFrameworkCore" Version="3.7.0" />
<PackageReference Include="CoreEx.Validation" Version="3.7.0" />
<PackageReference Include="CoreEx.FluentValidation" Version="3.7.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.20" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class Company : ReferenceDataBaseEx<Guid, Company>
/// </summary>
public string? ExternalCode
{
get => GetMapping<string?>(nameof(ExternalCode));
get => GetMapping<string>(nameof(ExternalCode));
set { var __externalCode = ExternalCode; SetValue(ref __externalCode, value); SetMapping(nameof(ExternalCode), __externalCode!); }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public partial class Gender : ReferenceDataBaseEx<Guid, Gender>
[JsonIgnore]
public string? TripCode
{
get => GetMapping<string?>(nameof(TripCode));
get => GetMapping<string>(nameof(TripCode));
set { var __tripCode = TripCode; SetValue(ref __tripCode, value); SetMapping(nameof(TripCode), __tripCode!); }
}

Expand Down
2 changes: 1 addition & 1 deletion samples/Demo/Beef.Demo.Common/Beef.Demo.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Folder Include="Agents\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
<PackageReference Include="Grpc.Tools" Version="2.60.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion samples/Demo/Beef.Demo.Test/Beef.Demo.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CoreEx.UnitTesting" Version="3.6.3" />
<PackageReference Include="CoreEx.UnitTesting" Version="3.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion samples/My.Hr/My.Hr.Api/My.Hr.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx.AspNetCore" Version="3.6.3" />
<PackageReference Include="CoreEx.AspNetCore" Version="3.7.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions samples/My.Hr/My.Hr.Business/My.Hr.Business.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.6.3" />
<PackageReference Include="CoreEx.EntityFrameworkCore" Version="3.6.3" />
<PackageReference Include="CoreEx.Validation" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.7.0" />
<PackageReference Include="CoreEx.EntityFrameworkCore" Version="3.7.0" />
<PackageReference Include="CoreEx.Validation" Version="3.7.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.20" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion samples/My.Hr/My.Hr.Common/My.Hr.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions samples/My.Hr/My.Hr.Test/My.Hr.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.6.3" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions samples/MyEf.Hr/MyEf.Hr.Api/MyEf.Hr.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx.AspNetCore" Version="3.6.3" />
<PackageReference Include="CoreEx.Azure" Version="3.6.3" />
<PackageReference Include="CoreEx.AspNetCore" Version="3.7.0" />
<PackageReference Include="CoreEx.Azure" Version="3.7.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.7" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
Expand Down
8 changes: 4 additions & 4 deletions samples/MyEf.Hr/MyEf.Hr.Business/MyEf.Hr.Business.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<ImplicitUsings>true</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.6.3" />
<PackageReference Include="CoreEx.EntityFrameworkCore" Version="3.6.3" />
<PackageReference Include="CoreEx.Validation" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.7.0" />
<PackageReference Include="CoreEx.EntityFrameworkCore" Version="3.7.0" />
<PackageReference Include="CoreEx.Validation" Version="3.7.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.20" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/MyEf.Hr/MyEf.Hr.Common/MyEf.Hr.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="CoreEx.Azure" Version="3.6.3" />
<PackageReference Include="CoreEx.Validation" Version="3.6.3" />
<PackageReference Include="CoreEx.Azure" Version="3.7.0" />
<PackageReference Include="CoreEx.Validation" Version="3.7.0" />
<PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="2.22.0" />
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.ServiceBus" Version="5.13.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.6.3" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions samples/MyEf.Hr/MyEf.Hr.Test/MyEf.Hr.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CoreEx" Version="3.6.3" />
<PackageReference Include="CoreEx" Version="3.7.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.6.3" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.7.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
"type": "generated",
"generator": "constant",
"parameters": {
"value": "3.6.3"
"value": "3.7.0"
},
"replaces": "CoreExVersion"
},
"beef_version": {
"type": "generated",
"generator": "constant",
"parameters": {
"value": "5.7.1"
"value": "5.7.2"
},
"replaces": "BeefVersion"
},
Expand Down
8 changes: 8 additions & 0 deletions tools/Beef.CodeGen.Core/Config/Entity/EntityConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,14 @@ public class EntityConfig : ConfigBase<CodeGenConfig, CodeGenConfig>
Description = "Prepended to `Operation.HttpAgentCode` where specified to enable standardized functionality.")]
public string? HttpAgentCode { get; set; }

/// <summary>
/// Indicates that a custom HTTP Agent <c>Mapper</c> will be used; i.e. not generated.
/// </summary>
[JsonProperty("httpAgentCustomMapper", DefaultValueHandling = DefaultValueHandling.Ignore)]
[CodeGenProperty("OData", Title = "Indicates that a custom HTTP Agent `Mapper` will be used; i.e. not generated.",
Description = "Otherwise, by default, a `Mapper` will be generated.")]
public bool? HttpAgentCustomMapper { get; set; }

/// <summary>
/// Gets or sets the `HttpAgent` data-layer name that should be used for base mappings.
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions tools/Beef.CodeGen.Core/Schema/entity.beef-5.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,11 @@
"title": "The fluent-style method-chaining C# HTTP Agent API code to include where 'Operation.AutoImplement' is 'HttpAgent'.",
"description": "Prepended to 'Operation.HttpAgentCode' where specified to enable standardized functionality."
},
"httpAgentCustomMapper": {
"type": "boolean",
"title": "Indicates that a custom HTTP Agent 'Mapper' will be used; i.e. not generated.",
"description": "Otherwise, by default, a 'Mapper' will be generated."
},
"httpAgentMapperBase": {
"type": "string",
"title": "The HTTP Agent data-layer name that should be used for base mappings."
Expand Down
2 changes: 1 addition & 1 deletion tools/Beef.CodeGen.Core/Templates/Entity_cs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public {{#if Abstract}}abstract {{/if}}partial class {{{EntityName}}} : {{{Entit
{{#if RefDataMapping}}
public {{{PropertyType}}} {{Name}}
{
get => GetMapping<{{{PropertyType}}}>(nameof({{Name}}));
get => GetMapping<{{{Type}}}>(nameof({{Name}}));
set { var _{{PropertyPrivateName}} = {{Name}}; SetValue(ref _{{PropertyPrivateName}}, value); SetMapping(nameof({{Name}}), _{{PropertyPrivateName}}!); }
}
{{else}}
Expand Down
2 changes: 1 addition & 1 deletion tools/Beef.Database.Core/Beef.Database.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CoreEx.Database" Version="3.6.3" />
<PackageReference Include="CoreEx.Database" Version="3.7.0" />
<PackageReference Include="DbEx" Version="2.3.14" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion tools/Beef.Database.MySql/Beef.Database.MySql.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CoreEx.Database.MySql" Version="3.6.3" />
<PackageReference Include="CoreEx.Database.MySql" Version="3.7.0" />
<PackageReference Include="DbEx.MySql" Version="2.3.14" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.6.3" />
<PackageReference Include="CoreEx.Database.SqlServer" Version="3.7.0" />
<PackageReference Include="DbEx.SqlServer" Version="2.3.14" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion tools/Beef.Test.NUnit/Beef.Test.NUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.6.3" />
<PackageReference Include="CoreEx.UnitTesting.NUnit" Version="3.7.0" />
</ItemGroup>

<Import Project="..\..\Common.targets" />
Expand Down

0 comments on commit 0bb5203

Please sign in to comment.