Exemplo n.º 1
0
 public async Task AddAsync(EvlogUser evlogUser)
 {
     var dao = new EvlogWebUserDM
     {
         UserName       = evlogUser.Email,
         Email          = evlogUser.Email,
         LockoutEnabled = true,
         EmailConfirmed = evlogUser.IsConfirmed,
         FullName       = evlogUser.Profile?.FullName
     };
     await users.CreateAsync(dao); // TOOD: check the result
 }
Exemplo n.º 2
0
        static EvlogUser?FromDao(EvlogWebUserDM dao)
        {
            if (dao is null)
            {
                return(null);
            }
            var profile = dao.FullName is null ? null : new UserProfile(dao.FullName);

            return(new EvlogUser(dao.Email, isConfirmed: dao.EmailConfirmed)
            {
                Id = dao.Id,
                Profile = profile
            });
        }