Пример #1
0
        public User CheckValidityUser(string email, string password)
        {
            if (email == "")
            {
                throw new ArgumentException("Emailadress can't be empty");
            }
            if (email.Length > 50)
            {
                throw new ArgumentException("Emailadress can't be too long");
            }

            if (password == "")
            {
                throw new ArgumentException("Password can't be empty");
            }
            if (password.Length > 50)
            {
                throw new ArgumentException("Password can't be too long");
            }


            return(_user.CheckValidityUser(email, password));
        }
Пример #2
0
 public bool CheckValidityUser(string email, string password) => context.CheckValidityUser(email, password);