public Action(int actionId) { SqlDataReader reader = new ActionData().GetActionByID(actionId); if (reader.Read()) { LoadAction(reader); } reader.Close(); }
public void LoadAll() { using (SqlDataReader reader = new ActionData().GetActions()) { while (reader.Read()) { this.Add(new Action(reader)); } reader.Close(); } }