public static ObservableCollection<Project> GetAllProject() { ObservableCollection<Project> pamList = new ObservableCollection<Project>(); string sqlCommand = String.Format("select pID from Project"); Sql sql = new Sql(); SqlDataReader reader = sql.SelectAllProjectAndMap(sqlCommand); while (reader.Read()) { int pmID = Int32.Parse(reader[0].ToString()); Project pam = new Project(); pam.pID = pmID; pam.select(); pamList.Add(pam); } return pamList; }