public static Contributor AuthenticateUser(string username, string password) { ContributorsTableAdapter contributorsAdpt = new ContributorsTableAdapter(); try { if (!(bool)contributorsAdpt.AuthenticateUser(username, password)) { throw new Exception("The supplied credentials are invalid."); } return(new Contributor(username)); } catch { throw; } }
public Contributor(string username) { _adpt = new ContributorsTableAdapter(); _dataRow = _adpt.GetByEmail(username)[0]; }