コード例 #1
0
        public async Task <User> Register(User user, string password)
        {
            byte[] passwordHash, passwordSalt;
            CreatePasswordHash(password, out passwordHash, out passwordSalt);

            user.PasswordHash = passwordHash;
            user.PasswordSalt = passwordSalt;

            await context.Users.AddAsync(user);

            await context.SaveChangesAsync();

            return(user);
        }
コード例 #2
0
 public async Task Save()
 {
     await context.SaveChangesAsync();
 }