You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
at the moment I'm working on a Project which integrates Azure AD as Auth Provider. As single Point of Truth Emails etc. is stored in AAD.
To obtain the AAD Data the GetMyMemberQuery looks like this:
public async Task<MemberModel> Handle(GetMyMemberQuery request, CancellationToken cancellationToken)
{
var member = await _memberContext.Members.SingleOrDefaultAsync(x => x.UserId == request.LoginId, cancellationToken);
if (member == null) throw new InvalidCommandException("Member not found");
try
{
var email = await _memberExternalDataEnricher.GetMemberEmailAsync(member);
var userName = await _memberExternalDataEnricher.GetMemberUserNameAsync(member);
return MemberModel.FromMember(member,email,userName);
}
catch (Exception e)
{
_logger.LogError("Exception during enriching Member",e);
}
return MemberModel.FromMember(member);
}
Now when I'm implementing the GetAllMemberQuery I have to copy and paste the Data Enrichment-Part.
On the other hand, i could query the GetMyMemberQuery for each user. is this a valid pattern?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
at the moment I'm working on a Project which integrates Azure AD as Auth Provider. As single Point of Truth Emails etc. is stored in AAD.
To obtain the AAD Data the GetMyMemberQuery looks like this:
Now when I'm implementing the GetAllMemberQuery I have to copy and paste the Data Enrichment-Part.
On the other hand, i could query the GetMyMemberQuery for each user. is this a valid pattern?
Beta Was this translation helpful? Give feedback.
All reactions