Skip to content

Commit c89fe3b

Browse files
authored
v5.17.0 (#264)
* v5.17.0 - *Enhancement:* The `Common`-project related code-generated artefacts have all been updated to leverage `global using` and file scoped namespace declarations. - A new [`GlobalUsings.cs`](./templates/Beef.Template.Solution/content/Company.AppName.Common/GlobalUsings.cs) will need to be manually added to existing `Common` projects to enable; see [this](./templates/Beef.Template.Solution/content/Company.AppName.Common/GlobalUsings.cs) for an example and alter the last two namespaces accordingly. - The `*.Common.csproj` will need to be manually updated to include `<LangVersion>Preview</LangVersion>` and `<ImplicitUsings>true</ImplicitUsings>`. * Re-gen Beef.Demo.
1 parent 063d954 commit c89fe3b

File tree

139 files changed

+4222
-5032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+4222
-5032
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Represents the **NuGet** versions.
44

5+
## v5.17.0
6+
- *Enhancement:* The `Common`-project related code-generated artefacts have all been updated to leverage `global using` and file scoped namespace declarations.
7+
- A new [`GlobalUsings.cs`](./templates/Beef.Template.Solution/content/Company.AppName.Common/GlobalUsings.cs) will need to be manually added to existing `Common` projects to enable; see [this](./templates/Beef.Template.Solution/content/Company.AppName.Common/GlobalUsings.cs) for an example and alter the last two namespaces accordingly.
8+
- The `*.Common.csproj` will need to be manually updated to include `<LangVersion>Preview</LangVersion>` and `<ImplicitUsings>true</ImplicitUsings>`.
9+
510
## v5.16.2
611
- *Fixed:* `Operation.AuthEntity` and `Operation.AuthOperation` updated to code-gen the `Manager`-based authorization (`ExecutionContent.UserIsAuthorized`) invocation.
712
- *Fixed:* Code-generation logging/auditing of endpoints updated to also include the authorization configuration.

Common.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>5.16.2</Version>
3+
<Version>5.17.0</Version>
44
<LangVersion>preview</LangVersion>
55
<Authors>Avanade</Authors>
66
<Company>Avanade</Company>

docs/Entity-CodeGeneration-Config.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ Category | Description
3535
[`OData`](#OData) | Provides the _OData Data-layer_ configuration.
3636
[`HttpAgent`](#HttpAgent) | Provides the _HTTP Agent Data-layer_ configuration.
3737
[`gRPC`](#gRPC) | Provides the _gRPC_ configuration.
38-
[`Path`](#Path) | Provides the _Path (Directory)_ configuration for the generated artefacts.
39-
[`Namespace`](#Namespace) | Provides the _.NET Namespace_ configuration for the generated artefacts.
38+
[`Path`](#Path) | Provides the _Path (Directory)_ configuration.
39+
[`Namespace`](#Namespace) | Provides the _.NET Namespace_ configuration.
40+
[`Auth`](#Auth) | Provides the _Authorization_ configuration.
4041
[`Collections`](#Collections) | Provides related child (hierarchical) configuration.
4142

4243
The properties with a bold name are those that are more typically used (considered more important).
@@ -188,7 +189,7 @@ Property | Description
188189
<br/>
189190

190191
## Path
191-
Provides the _Path (Directory)_ configuration for the generated artefacts.
192+
Provides the _Path (Directory)_ configuration.
192193

193194
Property | Description
194195
-|-
@@ -200,7 +201,7 @@ Property | Description
200201
<br/>
201202

202203
## Namespace
203-
Provides the _.NET Namespace_ configuration for the generated artefacts.
204+
Provides the _.NET Namespace_ configuration.
204205

205206
Property | Description
206207
-|-
@@ -211,6 +212,18 @@ Property | Description
211212

212213
<br/>
213214

215+
## Auth
216+
Provides the _Authorization_ configuration.
217+
218+
Property | Description
219+
-|-
220+
`authActionCreate` | The default `Operation.AuthAction` for an `Operation.Type` of `Create`.<br/>&dagger; Defaults to `Create`.
221+
`authActionRead` | The default `Operation.AuthAction` for an `Operation.Type` of `Get` or `GetColl`.<br/>&dagger; Defaults to `Read`.
222+
`authActionUpdate` | The default `Operation.AuthAction` for an `Operation.Type` of `Update`.<br/>&dagger; Defaults to `Update`.
223+
`authActionDelete` | The default `Operation.AuthAction` for an `Operation.Type` of `Delete`.<br/>&dagger; Defaults to `Delete`.
224+
225+
<br/>
226+
214227
## Collections
215228
Provides related child (hierarchical) configuration.
216229

samples/Cdr.Banking/Cdr.Banking.Business/Data/Model/Generated/Account.cs

+85-86
Original file line numberDiff line numberDiff line change
@@ -2,91 +2,90 @@
22
* This file is automatically generated; any changes will be lost.
33
*/
44

5-
namespace Cdr.Banking.Business.Data.Model
5+
namespace Cdr.Banking.Business.Data.Model;
6+
7+
/// <summary>
8+
/// Represents the Account model for data persistence model.
9+
/// </summary>
10+
public partial class Account : IIdentifier<string>
611
{
712
/// <summary>
8-
/// Represents the Account model for data persistence model.
9-
/// </summary>
10-
public partial class Account : IIdentifier<string>
11-
{
12-
/// <summary>
13-
/// Gets or sets the identifier.
14-
/// </summary>
15-
public string? Id { get; set; }
16-
17-
/// <summary>
18-
/// Gets or sets the Creation Date.
19-
/// </summary>
20-
public DateTime CreationDate { get; set; }
21-
22-
/// <summary>
23-
/// Gets or sets the Display Name.
24-
/// </summary>
25-
public string? DisplayName { get; set; }
26-
27-
/// <summary>
28-
/// Gets or sets the Nickname.
29-
/// </summary>
30-
public string? Nickname { get; set; }
31-
32-
/// <summary>
33-
/// Gets or sets the Open Status.
34-
/// </summary>
35-
public string? OpenStatus { get; set; }
36-
37-
/// <summary>
38-
/// Indicates whether Is Owned.
39-
/// </summary>
40-
public bool IsOwned { get; set; }
41-
42-
/// <summary>
43-
/// Gets or sets the Masked Number.
44-
/// </summary>
45-
public string? MaskedNumber { get; set; }
46-
47-
/// <summary>
48-
/// Gets or sets the Product Category.
49-
/// </summary>
50-
public string? ProductCategory { get; set; }
51-
52-
/// <summary>
53-
/// Gets or sets the Product Name.
54-
/// </summary>
55-
public string? ProductName { get; set; }
56-
57-
/// <summary>
58-
/// Gets or sets the Bsb.
59-
/// </summary>
60-
public string? Bsb { get; set; }
61-
62-
/// <summary>
63-
/// Gets or sets the Account Number.
64-
/// </summary>
65-
public string? AccountNumber { get; set; }
66-
67-
/// <summary>
68-
/// Gets or sets the Bundle Name.
69-
/// </summary>
70-
public string? BundleName { get; set; }
71-
72-
/// <summary>
73-
/// Gets or sets the Specific Account U Type.
74-
/// </summary>
75-
public string? SpecificAccountUType { get; set; }
76-
77-
/// <summary>
78-
/// Gets or sets the Term Deposit.
79-
/// </summary>
80-
public TermDepositAccount? TermDeposit { get; set; }
81-
82-
/// <summary>
83-
/// Gets or sets the Credit Card.
84-
/// </summary>
85-
public CreditCardAccount? CreditCard { get; set; }
86-
87-
/// <summary>
88-
/// Gets or sets the Balance.
89-
/// </summary>
90-
public Balance? Balance { get; set; }
91-
}
92-
}
13+
/// Gets or sets the identifier.
14+
/// </summary>
15+
public string? Id { get; set; }
16+
17+
/// <summary>
18+
/// Gets or sets the Creation Date.
19+
/// </summary>
20+
public DateTime CreationDate { get; set; }
21+
22+
/// <summary>
23+
/// Gets or sets the Display Name.
24+
/// </summary>
25+
public string? DisplayName { get; set; }
26+
27+
/// <summary>
28+
/// Gets or sets the Nickname.
29+
/// </summary>
30+
public string? Nickname { get; set; }
31+
32+
/// <summary>
33+
/// Gets or sets the Open Status.
34+
/// </summary>
35+
public string? OpenStatus { get; set; }
36+
37+
/// <summary>
38+
/// Indicates whether Is Owned.
39+
/// </summary>
40+
public bool IsOwned { get; set; }
41+
42+
/// <summary>
43+
/// Gets or sets the Masked Number.
44+
/// </summary>
45+
public string? MaskedNumber { get; set; }
46+
47+
/// <summary>
48+
/// Gets or sets the Product Category.
49+
/// </summary>
50+
public string? ProductCategory { get; set; }
51+
52+
/// <summary>
53+
/// Gets or sets the Product Name.
54+
/// </summary>
55+
public string? ProductName { get; set; }
56+
57+
/// <summary>
58+
/// Gets or sets the Bsb.
59+
/// </summary>
60+
public string? Bsb { get; set; }
61+
62+
/// <summary>
63+
/// Gets or sets the Account Number.
64+
/// </summary>
65+
public string? AccountNumber { get; set; }
66+
67+
/// <summary>
68+
/// Gets or sets the Bundle Name.
69+
/// </summary>
70+
public string? BundleName { get; set; }
71+
72+
/// <summary>
73+
/// Gets or sets the Specific Account U Type.
74+
/// </summary>
75+
public string? SpecificAccountUType { get; set; }
76+
77+
/// <summary>
78+
/// Gets or sets the Term Deposit.
79+
/// </summary>
80+
public TermDepositAccount? TermDeposit { get; set; }
81+
82+
/// <summary>
83+
/// Gets or sets the Credit Card.
84+
/// </summary>
85+
public CreditCardAccount? CreditCard { get; set; }
86+
87+
/// <summary>
88+
/// Gets or sets the Balance.
89+
/// </summary>
90+
public Balance? Balance { get; set; }
91+
}

samples/Cdr.Banking/Cdr.Banking.Business/Data/Model/Generated/AccountUType.cs

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
* This file is automatically generated; any changes will be lost.
33
*/
44

5-
namespace Cdr.Banking.Business.Data.Model
6-
{
7-
/// <summary>
8-
/// Represents the Account U Type model.
9-
/// </summary>
10-
public partial class AccountUType : ReferenceDataBase<Guid> { }
5+
namespace Cdr.Banking.Business.Data.Model;
116

12-
/// <summary>
13-
/// Represents the <see cref="AccountUType"/> collection.
14-
/// </summary>
15-
public partial class AccountUTypeCollection : List<AccountUType> { }
16-
}
7+
/// <summary>
8+
/// Represents the Account U Type model.
9+
/// </summary>
10+
public partial class AccountUType : ReferenceDataBase<Guid> { }
11+
12+
/// <summary>
13+
/// Represents the <see cref="AccountUType"/> collection.
14+
/// </summary>
15+
public partial class AccountUTypeCollection : List<AccountUType> { }

samples/Cdr.Banking/Cdr.Banking.Business/Data/Model/Generated/Balance.cs

+29-30
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,40 @@
22
* This file is automatically generated; any changes will be lost.
33
*/
44

5-
namespace Cdr.Banking.Business.Data.Model
5+
namespace Cdr.Banking.Business.Data.Model;
6+
7+
/// <summary>
8+
/// Represents the Balance model.
9+
/// </summary>
10+
public partial class Balance
611
{
712
/// <summary>
8-
/// Represents the Balance model.
13+
/// Gets or sets the Current Balance.
914
/// </summary>
10-
public partial class Balance
11-
{
12-
/// <summary>
13-
/// Gets or sets the Current Balance.
14-
/// </summary>
15-
public decimal CurrentBalance { get; set; }
15+
public decimal CurrentBalance { get; set; }
1616

17-
/// <summary>
18-
/// Gets or sets the Available Balance.
19-
/// </summary>
20-
public decimal AvailableBalance { get; set; }
17+
/// <summary>
18+
/// Gets or sets the Available Balance.
19+
/// </summary>
20+
public decimal AvailableBalance { get; set; }
2121

22-
/// <summary>
23-
/// Gets or sets the Credit Limit.
24-
/// </summary>
25-
public decimal CreditLimit { get; set; }
22+
/// <summary>
23+
/// Gets or sets the Credit Limit.
24+
/// </summary>
25+
public decimal CreditLimit { get; set; }
2626

27-
/// <summary>
28-
/// Gets or sets the Amortised Limit.
29-
/// </summary>
30-
public decimal AmortisedLimit { get; set; }
27+
/// <summary>
28+
/// Gets or sets the Amortised Limit.
29+
/// </summary>
30+
public decimal AmortisedLimit { get; set; }
3131

32-
/// <summary>
33-
/// Gets or sets the Currency.
34-
/// </summary>
35-
public string? Currency { get; set; }
32+
/// <summary>
33+
/// Gets or sets the Currency.
34+
/// </summary>
35+
public string? Currency { get; set; }
3636

37-
/// <summary>
38-
/// Gets or sets the Purses.
39-
/// </summary>
40-
public BalancePurseCollection? Purses { get; set; }
41-
}
42-
}
37+
/// <summary>
38+
/// Gets or sets the Purses.
39+
/// </summary>
40+
public BalancePurseCollection? Purses { get; set; }
41+
}

samples/Cdr.Banking/Cdr.Banking.Business/Data/Model/Generated/BalancePurse.cs

+16-17
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,25 @@
22
* This file is automatically generated; any changes will be lost.
33
*/
44

5-
namespace Cdr.Banking.Business.Data.Model
5+
namespace Cdr.Banking.Business.Data.Model;
6+
7+
/// <summary>
8+
/// Represents the <see cref="Balance"/> Purse model.
9+
/// </summary>
10+
public partial class BalancePurse
611
{
712
/// <summary>
8-
/// Represents the <see cref="Balance"/> Purse model.
13+
/// Gets or sets the Amount.
914
/// </summary>
10-
public partial class BalancePurse
11-
{
12-
/// <summary>
13-
/// Gets or sets the Amount.
14-
/// </summary>
15-
public decimal Amount { get; set; }
16-
17-
/// <summary>
18-
/// Gets or sets the Currency.
19-
/// </summary>
20-
public string? Currency { get; set; }
21-
}
15+
public decimal Amount { get; set; }
2216

2317
/// <summary>
24-
/// Represents the <see cref="BalancePurse"/> collection.
18+
/// Gets or sets the Currency.
2519
/// </summary>
26-
public partial class BalancePurseCollection : List<BalancePurse> { }
27-
}
20+
public string? Currency { get; set; }
21+
}
22+
23+
/// <summary>
24+
/// Represents the <see cref="BalancePurse"/> collection.
25+
/// </summary>
26+
public partial class BalancePurseCollection : List<BalancePurse> { }

0 commit comments

Comments
 (0)