public static bool Account_Get(Account account, UserAccountTypes userType) { IUserAccountDAL userAccountDB; switch (userType) { case UserAccountTypes.Employee: userAccountDB = new EmployeeUserAccountDAL(connectionstring); break; case UserAccountTypes.Customer: userAccountDB = new CustomerUserAccountDAL(connectionstring); break; default: throw new Exception("usertype is not valid"); } //return userAccountDB.Authorize(userName, password); return(userAccountDB.Get(account)); }