public MedImagingTestItems GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            MedImagingTestItems ob = this[GetKey(keypair)];

            return((MedImagingTestItems)ob);
        }
        public MedImagingTestItems GetObjectByKey(long k_MedImgTestItemID)
        {
            if (this.Contains(GetKey(k_MedImgTestItemID)) == false)
            {
                return(null);
            }
            MedImagingTestItems ob = this[GetKey(k_MedImgTestItemID)];

            return((MedImagingTestItems)ob);
        }
        public MedImagingTestItems GetObjectByKey(KeyValuePair <string, long> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            MedImagingTestItems ob = this[keypair];

            return((MedImagingTestItems)ob);
        }
        public bool ChangeItem(KeyValuePair <string, long> keypair, MedImagingTestItems item)
        {
            MedImagingTestItems orig = this.GetObjectByKey(keypair);

            if (orig != null)
            {
                int index = this.IndexOf(orig);
                this.SetItem(index, item);

                return(true);
            }

            return(false);
        }
        public MedImagingTestItems GetObjectByKey(long k_MedImgTestItemID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_MedImgTestItemID)) == false)
            {
                MedImagingTestItems ob = repository.GetQuery <MedImagingTestItems>().FirstOrDefault(o => o.MedImgTestItemID == k_MedImgTestItemID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            MedImagingTestItems obj = this[GetKey(k_MedImgTestItemID)];

            return((MedImagingTestItems)obj);
        }
        public bool DeleteObject(MedImagingTestItems item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
        public bool AddObject(MedImagingTestItems item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
 protected override KeyValuePair <string, long> GetKeyForItem(MedImagingTestItems item)
 {
     return(item.Key);
 }