public void Edit(RecordList element) { try { if (element == null) { throw new ArgumentNullException("element", "RecordList can not be null"); } RecordList obj = this.recordLists.Find(p => p.Guid == element.Guid); if (obj == null) { throw new ArgumentNullException("element", "RecordList doesn't find"); } else { this.recordLists.Remove(obj); this.recordLists.Add(element); // TODO BASE DE DATOS } } catch (Exception ex) { throw new ArgumentNullException("element", "RecordList exception in remove operation: " + ex.Message); } }
public void Add(RecordList element) { try { if (element == null) { throw new ArgumentNullException("element", "RecordList can not be null"); } this.recordLists.Add(element); // TODO BASE DE DATOS } catch (Exception ex) { throw new ArgumentNullException("element", "RecordList exception in add operation: " + ex.Message); } }