Skip to content

Commit 0eed97f

Browse files
Copilotardalis
andauthored
Fix DeleteContributorService passing raw int instead of ContributorId to GetByIdAsync (#1000)
* Initial plan * Fix: pass ContributorId instead of int to GetByIdAsync in DeleteContributorService Co-authored-by: ardalis <782127+ardalis@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ardalis <782127+ardalis@users.noreply.github.com>
1 parent ad91b4c commit 0eed97f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Clean.Architecture.Core/Services/DeleteContributorService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class DeleteContributorService(IRepository<Contributor> _repository,
1818
public async ValueTask<Result> DeleteContributor(ContributorId contributorId)
1919
{
2020
_logger.LogInformation("Deleting Contributor {contributorId}", contributorId);
21-
Contributor? aggregateToDelete = await _repository.GetByIdAsync(contributorId.Value);
21+
Contributor? aggregateToDelete = await _repository.GetByIdAsync(contributorId);
2222
if (aggregateToDelete == null) return Result.NotFound();
2323

2424
await _repository.DeleteAsync(aggregateToDelete);

0 commit comments

Comments
 (0)