// private Dictionary<Type, Func<string, string, ILoginToken>> LoginDic; public LoginService() { _airlineDAO = new AirlineDAOMSSQL(); _customerDAO = new CustomerDAOMSSQL(); // LoginDic = new Dictionary<Type, Func<string, string, ILoginToken>>(); //AddToDictionary(); }
public bool CustomerLogin(string userName, string password, out LoginToken <Customer> loginToken) { _customerDAO = new DAOs.CustomerDAOMSSQL(); Customer customer = _customerDAO.GetCustomerByUsername(userName); if (password == customer.Password) { loginToken = new LoginToken <Customer>(); loginToken.User = customer; return(true); } throw new WrongPasswordException(); }