public void Execute() { if (Key != null && Cach.ContainsKey(Key)) { Cach.Remove(Key); CashModelActuality.Remove(Key); } }
public void Execute() { var cach = CashModelActuality.FirstOrDefault(x => x.Value == ModelId); while (cach.Key != null) { Cach.Remove(cach.Key); CashModelActuality.Remove(cach.Key); cach = CashModelActuality.FirstOrDefault(x => x.Value == ModelId); } }
public void Execute() { if (ViewModel != null) { if (Cach.ContainsKey(ViewModel.CachKey)) { Cach.Remove(ViewModel.CachKey); CashModelActuality.Remove(ViewModel.CachKey); } Cach.Add(ViewModel.CachKey, ViewModel); CashModelActuality.Add(ViewModel.CachKey, ViewModel.RelativeModelId); } }