Esempio n. 1
0
        public async Task <User> Register(User user, string password)
        {
            byte[] pwdHash, pwdSalt;
            CreatePwdHash(password, out pwdHash, out pwdSalt);
            user.passwordHash = pwdHash;
            user.passwordSalt = pwdSalt;
            await _context.AddAsync(user);

            await _context.SaveChangesAsync();

            return(user);
        }