public void Delete() { tb_m_gcms_cas existing = _repository.Find(x => x.ID == this.ID).FirstOrDefault(); if (existing != null) { _repository.Delete(this); } }
public void Update() { tb_m_gcms_cas existing = _repository.Find(x => x.ID == this.ID).FirstOrDefault(); if (existing != null) { _repository.Edit(existing, this); } else { //_repository.Add(this); } }