using Domain.Entities; namespace Features.Auth.Identity; /// /// Converts the persistence-agnostic domain entity into the /// shape required by . /// Kept here, in Features.Auth, rather than on itself so the domain layer has /// no dependency on ASP.NET Core Identity. /// 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, }; }