public Donor GetObjectByKey(long k_DonorID, LV.Core.DAL.Base.IRepository repository) { if (this.Contains(GetKey(k_DonorID)) == false) { Donor ob = repository.GetQuery <Donor>().FirstOrDefault(o => o.DonorID == k_DonorID); if (ob != null) { this.Add(ob); } return(ob); } Donor obj = this[GetKey(k_DonorID)]; return((Donor)obj); }
protected override KeyValuePair <string, long> GetKeyForItem(Donor item) { return(item.Key); }
public bool DeleteObject(Donor item, LV.Core.DAL.Base.IRepository repository) { repository.Update(item); return(true); }
public bool AddObject(Donor item, LV.Core.DAL.Base.IRepository repository) { repository.Add(item); return(true); }