Example #1
0
        public void Update(TModel modelObject)
        {
            var modelObjectKeyValue = KeyAttribute.GetKeyValue(modelObject);

            AssertKeyExists(modelObjectKeyValue);
            UpdateCollection(modelObjectKeyValue, modelObject);
            ElementUpdated?.Invoke(modelObject);
        }
Example #2
0
 public void Modify(T element)
 {
     List.Remove(List.Single(a => a.Id == element.Id));
     List.Add(element);
     ElementUpdated.Invoke(element);
 }