public void DeleteRecordFromRepo(LandingSite ls) { if (ls == null) { throw new Exception("Landing site cannot be null"); } int index = 0; while (index < LandingSiteCollection.Count) { if (LandingSiteCollection[index].ID == ls.ID) { LandingSiteCollection.RemoveAt(index); break; } index++; } }
public void DeleteRecordFromRepo(string id) { if (id == null) { throw new Exception("Record ID cannot be null"); } int index = 0; while (index < LandingSiteCollection.Count) { if (LandingSiteCollection[index].LandingSiteID == id) { LandingSiteCollection.RemoveAt(index); break; } index++; } }