ApplicationUser in a infraestructure
lavilaso opened this issue · 1 comments
lavilaso commented
I see that the applicationuser is in the infrastructure project on identity, what idea do you have about the user being a domain entity and what approach could we use to keep it in the domain but at the same time not couple that layer to identity?
PD: He's doing a great job here, wait for a coffee from me.
duhowise commented
You can take a dependency on the account service, Register a new user while creating that domain object and associate the two...
var registrationResult= await _accountService.RegisterAsync(new RegisterRequest
{
Email = request.EmailAddress,
FirstName = request.FirstName,
LastName = request.LastName,
Password = request.Password,
UserName = request.UserName,
ConfirmPassword = request.Password
}, _httpContextAccessor.HttpContext.Request.Headers["origin"]);
baker.UserId = registrationResult.Data;