public List<Reimbursement> GetReimbursement(string enrollmentcode, short typeid) { string cacheKey = string.Concat("$Deductible_ec_type$", enrollmentcode, "_", typeid); object CachedList = m_Cache.Get(cacheKey) as List<Reimbursement>; List<Reimbursement> lstReturn = null; if (CachedList == null)//get from the db call { PetfirstData pfData = new PetfirstData(); lstReturn = pfData.GetReimbursement(enrollmentcode, typeid); if (lstReturn.Count > 0) { double defaultValue = 0; defaultValue = (from l in lstReturn where l.IsDefault select l.Amount).FirstOrDefault(); if (defaultValue != 0) { lstReturn.RemoveAll(x => x.IsDefault == false && x.Amount == defaultValue); } m_Cache.Add(cacheKey, lstReturn); } else if (!enrollmentcode.Equals(_defaultEnrollment)) { lstReturn = pfData.GetReimbursement(_defaultEnrollment, typeid); if (lstReturn.Count > 0) { double defaultValue = 0; defaultValue = (from l in lstReturn where l.IsDefault select l.Amount).FirstOrDefault(); if (defaultValue != 0) { lstReturn.RemoveAll(x => x.IsDefault == false && x.Amount == defaultValue); } m_Cache.Add(cacheKey, lstReturn); } } } else lstReturn = (List<Reimbursement>)CachedList; return lstReturn; }