public bool Update(Dummy dummy) { if (dummy == null) { throw new ArgumentNullException("dummy"); } if(!_dummies.ContainsKey(dummy.Id)) return false; _dummies[dummy.Id] = dummy; return true; }
public Dummy Add(Dummy dummy) { if (dummy == null) { throw new ArgumentNullException("dummy"); } var guid = Guid.NewGuid(); dummy.Id = guid; _dummies.Add(guid, dummy); return dummy; }