Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
---------- Review by CodeLleviewer ----------
Summary:
The pull request introduces a new DddDbContext and related entities that follow Domain-Driven Design (DDD) best practices, such as using an Aggregate Root pattern and implementing a protected setter for the entity's Id property. The necessary changes are made to the existing QueryableExtensions class to support this new context.
Additions:
src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework/DbContexts/DddDbContext.cs
for Domain-Driven Design related entities, including DddA, DddB and DddC classes, with the proper AggregateRoot pattern implementation and protected setter for the entity's Id property.src/Codehard.Functional/Codehard.Functional.EntityFramework/Extensions/QueryableExtensions.cs
class to support IQueryable operations on DddDbContext.src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DddEntityTests.cs
,src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DomainEntityTests.cs
for DddDbContext, and related entities to ensure proper functionality.Updates:
src/Codehard.Common/Codehard.Common.DomainModel/Entity.cs
is updated with a protected setter for the Id property instead of public init accessor.Deletes:
DddA
,DddB
, andDddC
insrc/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/Entities/DomainDrivenDesign/
have been removed since they are replaced by their DDD-compliant versions with an AggregateRoot pattern implementation.Review order:
src/Codehard.Common/Codehard.Common.DomainModel/Entity.cs
. Review how Entity class has been updated to include a protected setter for the Id property.src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework/DbContexts/DddDbContext.cs
and check the new DddDbContext implementation, including relationships between DddA, DddB, and DddC entities.src/Codehard.Functional/Codehard.Functional.EntityFramework/Extensions/QueryableExtensions.cs
, which support IQueryable operations on the new DddDbContext.src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DddEntityTests.cs
and then checkingsrc/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DomainEntityTests.cs
.Suggestions:
src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework/Extensions/ModelBuilderExtensions.cs
.---------- Review by CodeLleviewer ----------
Summary
The pull request introduces a new DddDbContext and related entities that follow Domain-Driven Design (DDD) best practices, such as using an Aggregate Root pattern and implementing a protected setter for the entity's Id property. The necessary changes are made to the existing QueryableExtensions class to support this new context.
Additions
src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework/DbContexts/DddDbContext.cs
for Domain-Driven Design related entities, including DddA, DddB and DddC classes.src/Codehard.Functional/Codehard.Functional.EntityFramework/Extensions/QueryableExtensions.cs
class to support IQueryable operations on DddDbContext.src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DddEntityTests.cs
andsrc/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DomainEntityTests.cs
.Updates
src/Codehard.Common/Codehard.Common.DomainModel/Entity.cs
is updated with a protected setter for the Id property instead of public init accessor.Deletes
src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/Entities/DomainDrivenDesign/
since they are replaced by their DDD-compliant versions with an AggregateRoot pattern implementation.Review order
src/Codehard.Common/Codehard.Common.DomainModel/Entity.cs
. Review how Entity class has been updated to include a protected setter for the Id property.src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework/DbContexts/DddDbContext.cs
and review the new DDD-compliant entities.src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DddEntityTests.cs
and then checkingsrc/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework.Tests/DomainEntityTests.cs
.Security review
No sensitive data has been added or exposed in the new codebase.
Suggestions
src/Codehard.Infrastructure/Codehard.Infrastructure.EntityFramework/Extensions/ModelBuilderExtensions.cs
.