public static List <User> getList() { UserTableGateway DataGateway = new UserTableGateway(); DataTable TableData = DataGateway.Find(); List <User> tmp = new List <User>(); foreach (DataRow row in TableData.Rows) { tmp.Add(map(row)); } return(tmp); }
public static User GetByID(int id) { try { UserTableGateway DataGateway = new UserTableGateway(); DataTable TableData = DataGateway.FindByID(id); DataRow row = TableData.Rows[0]; return(map(row)); } catch { return(null); } }
public static User GetByEmail(string email) { try { UserTableGateway DataGateway = new UserTableGateway(); DataTable TableData = DataGateway.FindByEmail(email); DataRow row = TableData.Rows[0]; return(map(row)); } catch { return(null); } }
public void Insert() { UserTableGateway DataGateway = new UserTableGateway(); DataGateway.Insert(FirstName, LastName, Email, Password); }