public void AddRecordToRepo(ProjectSetting ps) { if (ps == null) { throw new ArgumentNullException("Error: The argument is Null"); } ProjectSettingCollection.Add(ps); }
public void DeleteRecordFromRepo(string id) { if (id == null) { throw new Exception("Record ID cannot be null"); } int index = 0; while (index < ProjectSettingCollection.Count) { if (ProjectSettingCollection[index].ProjectID == id) { ProjectSettingCollection.RemoveAt(index); break; } index++; } }
public List <ProjectSetting> GetAllProjectSettings() { return(ProjectSettingCollection.ToList()); }
public ProjectSetting GetProjectSetting(string projectID) { return(ProjectSettingCollection.FirstOrDefault(n => n.ProjectID == projectID)); }