mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 10:04:44 +00:00
Add self-service account management commands (delete, update username/email/password/profile)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Domain.Entities;
|
||||
|
||||
namespace Features.Auth.Identity;
|
||||
|
||||
/// <summary>
|
||||
/// Converts the persistence-agnostic <see cref="UserAccount" /> domain entity into the
|
||||
/// <see cref="ApplicationUser" /> shape required by <see cref="Microsoft.AspNetCore.Identity.UserManager{TUser}" />.
|
||||
/// Kept here, in Features.Auth, rather than on <see cref="UserAccount" /> itself so the domain layer has
|
||||
/// no dependency on ASP.NET Core Identity.
|
||||
/// </summary>
|
||||
public static class UserAccountExtensions
|
||||
{
|
||||
public static ApplicationUser ToApplicationUser(this UserAccount userAccount) =>
|
||||
new()
|
||||
{
|
||||
Id = userAccount.UserAccountId,
|
||||
UserName = userAccount.Username,
|
||||
Email = userAccount.Email,
|
||||
FirstName = userAccount.FirstName,
|
||||
LastName = userAccount.LastName,
|
||||
DateOfBirth = userAccount.DateOfBirth,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user