Example #1
0
        public async Task <Rower> Register(Rower rower, string password)
        {
            byte[] passwordHash, passwordSalt;
            CreatePasswordHash(password, out passwordHash, out passwordSalt);

            rower.PasswordHash = passwordHash;
            rower.PasswordSalt = passwordSalt;

            await _context.Rowers.AddAsync(rower);

            await _context.SaveChangesAsync();

            return(rower);
        }
 public async Task <bool> SaveAll()
 {
     return(await _context.SaveChangesAsync() > 0);
 }