Skip to content

Commit

Permalink
Recognize "Id" in DetermineAggregateIdMember
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-zahiri committed Nov 12, 2024
1 parent 2420c0b commit 14b468f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class Invoice
public int Version { get; set; }
}

public record BadCommand(Guid Id);
public record BadCommand(Guid XId);

public record InvoiceApproved;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ internal static MemberInfo DetermineAggregateIdMember(Type aggregateType, Type c
{
var conventionalMemberName = $"{aggregateType.Name}Id";
var member = commandType.GetMembers().FirstOrDefault(x =>
x.HasAttribute<IdentityAttribute>() || x.Name.EqualsIgnoreCase(conventionalMemberName));
x.HasAttribute<IdentityAttribute>() || x.Name.EqualsIgnoreCase(conventionalMemberName) || x.Name.EqualsIgnoreCase("Id"));

if (member == null)
{
Expand Down

0 comments on commit 14b468f

Please sign in to comment.