Exemplo n.º 1
0
        /// <summary>
        /// Disregards admin id and account number
        /// </summary>
        /// <param name="newAdmin"></param>
        /// <returns></returns>
        public bool RegisterAsAdmin(Admin admin)
        {
            var newAdmin       = new Admin(admin);
            var hashedPassword = Hasher.HashSHA512(newAdmin.GetPassword()).Digest;

            newAdmin.SetPassword(hashedPassword);

            return(dataAccessLogic.AddAdmin(newAdmin));
        }