public void RemoveCounterInformation(CounterInformation counterInfo) { try { this.ovcCounterInfo.Remove(ovcCounterInfo.FirstOrDefault(x => x.CounterNumber.Equals(counterInfo.CounterNumber))); } catch (Exception ex) { throw new FaultException(ex.Message); } }
public void SetCounterInformation(CounterInformation counterInfo) { try { if (ovcCounterInfo.SingleOrDefault(x => x.CounterNumber == counterInfo.CounterNumber) == null) { ovcCounterInfo.Add(counterInfo); } } catch { throw new FaultException("Unable to register"); } }