public int SaveIntoCaches() { if (Caches.Find(delegate(MODEL dele) { return(dele.Id.ToInt32() == this.Id.ToInt32()); }) == null) { Caches.Add(this); return(1); } else { return(0); } }
public int RemoveFromCaches() { MODEL m = Caches.Find(delegate(MODEL dele) { return(dele.Id.ToInt32() == this.Id.ToInt32()); }); if (m != null) { Caches.Remove(m); return(1); } else { return(0); } }