//-----------------------------register------------------------------------- public User Register(User user, string password) { byte[] passwordHash, passwordSalt; CreatePasswordHash(password, out passwordHash, out passwordSalt); user.PasswordHash = passwordHash; user.PasswordSalt = passwordSalt; _context.tbl_User.Add(user); _context.SaveChanges(); return(user); }
public bool SaveAll() { return(context.SaveChanges() > 0); }