-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d8d76c
commit b0c34d2
Showing
8 changed files
with
285 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ield.SolidInstruments.Example.Domain/Models/User/AggregateDataAccessModelConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// ================================================================================================================================= | ||
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
// ================================================================================================================================= | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Microsoft.Extensions.Configuration; | ||
using RapidField.SolidInstruments.DataAccess.EntityFramework; | ||
using System; | ||
|
||
namespace RapidField.SolidInstruments.Example.Domain.Models.User | ||
{ | ||
/// <summary> | ||
/// Encapsulates entity type configuration for the <see cref="AggregateDataAccessModel" /> class. | ||
/// </summary> | ||
public sealed class AggregateDataAccessModelConfiguration : DataAccessModelConfiguration<AggregateDataAccessModel> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AggregateDataAccessModelConfiguration" /> class. | ||
/// </summary> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
/// <exception cref="ArgumentNullException"> | ||
/// <paramref name="applicationConfiguration" /> is <see langword="null" />. | ||
/// </exception> | ||
public AggregateDataAccessModelConfiguration(IConfiguration applicationConfiguration) | ||
: base(applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Configures the entity. | ||
/// </summary> | ||
/// <param name="entityType"> | ||
/// The builder that is used to configure the entity. | ||
/// </param> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
protected override void Configure(EntityTypeBuilder<AggregateDataAccessModel> entityType, IConfiguration applicationConfiguration) => _ = entityType.HasMany(entity => entity.UserRoleAssignments).WithOne(entity => entity.User); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...pidField.SolidInstruments.Example.Domain/Models/User/ValueDataAccessModelConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// ================================================================================================================================= | ||
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
// ================================================================================================================================= | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Microsoft.Extensions.Configuration; | ||
using RapidField.SolidInstruments.DataAccess.EntityFramework; | ||
using System; | ||
|
||
namespace RapidField.SolidInstruments.Example.Domain.Models.User | ||
{ | ||
/// <summary> | ||
/// Encapsulates entity type configuration for the <see cref="ValueDataAccessModel" /> class. | ||
/// </summary> | ||
public sealed class ValueDataAccessModelConfiguration : DataAccessModelConfiguration<ValueDataAccessModel> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ValueDataAccessModelConfiguration" /> class. | ||
/// </summary> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
/// <exception cref="ArgumentNullException"> | ||
/// <paramref name="applicationConfiguration" /> is <see langword="null" />. | ||
/// </exception> | ||
public ValueDataAccessModelConfiguration(IConfiguration applicationConfiguration) | ||
: base(applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Configures the entity. | ||
/// </summary> | ||
/// <param name="entityType"> | ||
/// The builder that is used to configure the entity. | ||
/// </param> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
protected override void Configure(EntityTypeBuilder<ValueDataAccessModel> entityType, IConfiguration applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
....SolidInstruments.Example.Domain/Models/UserRole/AggregateDataAccessModelConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// ================================================================================================================================= | ||
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
// ================================================================================================================================= | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Microsoft.Extensions.Configuration; | ||
using RapidField.SolidInstruments.DataAccess.EntityFramework; | ||
using System; | ||
using UserRoleAssignmentModel = RapidField.SolidInstruments.Example.Domain.Models.UserRoleAssignment.AggregateDataAccessModel; | ||
|
||
namespace RapidField.SolidInstruments.Example.Domain.Models.UserRole | ||
{ | ||
/// <summary> | ||
/// Encapsulates entity type configuration for the <see cref="AggregateDataAccessModel" /> class. | ||
/// </summary> | ||
public sealed class AggregateDataAccessModelConfiguration : DataAccessModelConfiguration<AggregateDataAccessModel> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AggregateDataAccessModelConfiguration" /> class. | ||
/// </summary> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
/// <exception cref="ArgumentNullException"> | ||
/// <paramref name="applicationConfiguration" /> is <see langword="null" />. | ||
/// </exception> | ||
public AggregateDataAccessModelConfiguration(IConfiguration applicationConfiguration) | ||
: base(applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Configures the entity. | ||
/// </summary> | ||
/// <param name="entityType"> | ||
/// The builder that is used to configure the entity. | ||
/// </param> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
protected override void Configure(EntityTypeBuilder<AggregateDataAccessModel> entityType, IConfiguration applicationConfiguration) => _ = entityType.HasMany<UserRoleAssignmentModel>().WithOne(entity => entity.UserRole).HasForeignKey(entity => entity.UserRoleIdentifier); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...ield.SolidInstruments.Example.Domain/Models/UserRole/ValueDataAccessModelConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// ================================================================================================================================= | ||
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
// ================================================================================================================================= | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Microsoft.Extensions.Configuration; | ||
using RapidField.SolidInstruments.DataAccess.EntityFramework; | ||
using System; | ||
|
||
namespace RapidField.SolidInstruments.Example.Domain.Models.UserRole | ||
{ | ||
/// <summary> | ||
/// Encapsulates entity type configuration for the <see cref="ValueDataAccessModel" /> class. | ||
/// </summary> | ||
public sealed class ValueDataAccessModelConfiguration : DataAccessModelConfiguration<ValueDataAccessModel> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ValueDataAccessModelConfiguration" /> class. | ||
/// </summary> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
/// <exception cref="ArgumentNullException"> | ||
/// <paramref name="applicationConfiguration" /> is <see langword="null" />. | ||
/// </exception> | ||
public ValueDataAccessModelConfiguration(IConfiguration applicationConfiguration) | ||
: base(applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Configures the entity. | ||
/// </summary> | ||
/// <param name="entityType"> | ||
/// The builder that is used to configure the entity. | ||
/// </param> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
protected override void Configure(EntityTypeBuilder<ValueDataAccessModel> entityType, IConfiguration applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...ruments.Example.Domain/Models/UserRoleAssignment/AggregateDataAccessModelConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// ================================================================================================================================= | ||
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
// ================================================================================================================================= | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Microsoft.Extensions.Configuration; | ||
using RapidField.SolidInstruments.DataAccess.EntityFramework; | ||
using System; | ||
|
||
namespace RapidField.SolidInstruments.Example.Domain.Models.UserRoleAssignment | ||
{ | ||
/// <summary> | ||
/// Encapsulates entity type configuration for the <see cref="AggregateDataAccessModel" /> class. | ||
/// </summary> | ||
public sealed class AggregateDataAccessModelConfiguration : DataAccessModelConfiguration<AggregateDataAccessModel> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AggregateDataAccessModelConfiguration" /> class. | ||
/// </summary> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
/// <exception cref="ArgumentNullException"> | ||
/// <paramref name="applicationConfiguration" /> is <see langword="null" />. | ||
/// </exception> | ||
public AggregateDataAccessModelConfiguration(IConfiguration applicationConfiguration) | ||
: base(applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Configures the entity. | ||
/// </summary> | ||
/// <param name="entityType"> | ||
/// The builder that is used to configure the entity. | ||
/// </param> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
protected override void Configure(EntityTypeBuilder<AggregateDataAccessModel> entityType, IConfiguration applicationConfiguration) | ||
{ | ||
_ = entityType.HasOne(entity => entity.User).WithMany(entity => entity.UserRoleAssignments).HasForeignKey(entity => entity.UserIdentifier); | ||
_ = entityType.HasOne(entity => entity.UserRole).WithMany().HasForeignKey(entity => entity.UserRoleIdentifier); | ||
} | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
...Instruments.Example.Domain/Models/UserRoleAssignment/ValueDataAccessModelConfiguration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// ================================================================================================================================= | ||
// Copyright (c) RapidField LLC. Licensed under the MIT License. See LICENSE.txt in the project root for license information. | ||
// ================================================================================================================================= | ||
|
||
using Microsoft.EntityFrameworkCore.Metadata.Builders; | ||
using Microsoft.Extensions.Configuration; | ||
using RapidField.SolidInstruments.DataAccess.EntityFramework; | ||
using System; | ||
|
||
namespace RapidField.SolidInstruments.Example.Domain.Models.UserRoleAssignment | ||
{ | ||
/// <summary> | ||
/// Encapsulates entity type configuration for the <see cref="ValueDataAccessModel" /> class. | ||
/// </summary> | ||
public sealed class ValueDataAccessModelConfiguration : DataAccessModelConfiguration<ValueDataAccessModel> | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ValueDataAccessModelConfiguration" /> class. | ||
/// </summary> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
/// <exception cref="ArgumentNullException"> | ||
/// <paramref name="applicationConfiguration" /> is <see langword="null" />. | ||
/// </exception> | ||
public ValueDataAccessModelConfiguration(IConfiguration applicationConfiguration) | ||
: base(applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Configures the entity. | ||
/// </summary> | ||
/// <param name="entityType"> | ||
/// The builder that is used to configure the entity. | ||
/// </param> | ||
/// <param name="applicationConfiguration"> | ||
/// Configuration information for the application. | ||
/// </param> | ||
protected override void Configure(EntityTypeBuilder<ValueDataAccessModel> entityType, IConfiguration applicationConfiguration) | ||
{ | ||
return; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters