Esempio n. 1
0
        public void Upsert(DecisionArchiveItem decisionArchiveItem)
        {
            var existingDecision = Decisions.FirstOrDefault(d => d.Id == decisionArchiveItem.Id);

            if (existingDecision != null)
            {
                existingDecision = decisionArchiveItem;
            }
            else
            {
                Decisions = Decisions.Append(decisionArchiveItem).OrderByDescending(d => d.DateCreatedUtc).ToArray();
            }
        }
Esempio n. 2
0
 public void Remove(DecisionArchiveItem decisionArchiveItem)
 {
     Decisions = Decisions.Where(i => i.Id != decisionArchiveItem.Id).ToArray();
 }