예제 #1
0
        /// <summary>
        /// Sign up manager given user details
        /// </summary>
        /// <param name="name"></param>
        /// <param name="email"></param>
        /// <param name="password"></param>
        public void SignUpManager(string name, string email, string password)
        {
            if (repo.GetManagerByEmail(email) != null)
            {
                Log.Warning("Existing user attempted new sign up.");
                throw new Exception("Manager already exists!");
            }
            Manager newManager = new Manager(name, email, password);

            AddManager(newManager);
            SaveChanges();
        }
        public Manager GetManagerByEmail(string email)
        {
            Manager manager = managerRepo.GetManagerByEmail(email);

            return(manager);
        }