Exemple #1
0
        public async Task <IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken))
        {
            cancellationToken.ThrowIfCancellationRequested();

            await userRepository.Edit(user, session);

            return(IdentityResult.Success);
        }
        public async Task CreateAsync(TApplicationUser user)
        {
            var newUser = await userRepository.Edit(user.MapTo <TUser>(), session);

            user.Id        = newUser.Id;
            user.Email     = newUser.Email;
            user.FirstName = newUser.FirstName;
            user.LastName  = newUser.LastName;
            user.Password  = newUser.Password;
            user.Login     = newUser.Login;
            user.UserRoles = newUser.UserRoles;
            user.Claims    = newUser.Claims;
        }