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

ApplicationUser in a infraestructure #13

Open
lavilaso opened this issue Sep 9, 2020 · 1 comment
Open

ApplicationUser in a infraestructure #13

lavilaso opened this issue Sep 9, 2020 · 1 comment

Comments

@lavilaso
Copy link

lavilaso commented Sep 9, 2020

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
Copy link

duhowise commented Nov 3, 2020

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;

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

No branches or pull requests

2 participants