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

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

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

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

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

                return(true);
            }

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

            return((refImmunization)obj);
        }
 protected override KeyValuePair <string, long> GetKeyForItem(refImmunization item)
 {
     return(item.Key);
 }
        public bool DeleteObject(refImmunization item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

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

            return(true);
        }