示例#1
0
        public void CreateInscription(Inscription account)
        {
            if (account == null)
            {
                throw new ArgumentNullException(nameof(account));
            }


            // hash password
            account.Password = HashPassword(account.Password);

            // save account
            _context.Inscriptions.Add(account);
            _context.SaveChanges();
        }
示例#2
0
 public bool SaveChanges()
 {
     return(_context.SaveChanges() >= 0);
 }