Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded Support for Non-Default ID Type in AuditableEntitiesByCreatedOnBetweenSpec #866

Closed
wants to merge 27 commits into from

Conversation

baranacikgoz
Copy link
Contributor

The existing implementation has a limitation regarding the use of the AuiditableEntitiesByCreatedOnBetweenSpec with entities that have a defined non-default ID type.

Previously, if we defined an entity, such as Payment, with the default ID type, like so:

public class Payment : AuditableEntity, IAggregateRoot
{
...
}

it was perfectly possible to utilize AuditableEntitiesByCreatedOnBetweenSpec<Payment>.

However, when we add a specific ID type to the AuditableEntity, the compatibility changes.

public class Payment : AuditableEntity<int>, IAggregateRoot
{
...
}

In this format, we previously couldn't use AuditableEntitiesByCreatedOnBetweenSpec<Payment> due to the fact that AuditableEntity and AuditableEntity<int> are considered different types.

With the changes introduced in this pull request, the boilerplate now extends its support to non-default ID types within AuditableEntity.

Now the AuditableEntitiesByCreatedOnBetweenSpec can be used like AuditableEntitiesByCreatedOnBetweenSpec<Payment, int> for AuditableEntities that do not have default ID types.

…ly typed errors instead of DbUpdateException
@baranacikgoz baranacikgoz closed this by deleting the head repository Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant