/// <summary> /// This Function Will return all the ID Info types /// </summary> /// <returns></returns> public List <L_IDInformationType> GetIdInfoType() { try { var idInformationKey = CacheKey.CDS_ID_INFORMATION; var idInformationList = new List <L_IDInformationType>(); if (StaticCache.Exist(idInformationKey)) { idInformationList = (List <L_IDInformationType>)StaticCache.Get(idInformationKey); } else { using (var unitOfWork = new EFUnitOfWork()) { var lIdInfoTypeRepo = new L_IDInformationTypeRepository(new EFRepository <L_IDInformationType>(), unitOfWork); //Returning list of ID info type values idInformationList = lIdInfoTypeRepo.All().ToList(); StaticCache.Max(idInformationKey, idInformationList); } } return(idInformationList); } catch (Exception ex) { CommonErrorLogger.CommonErrorLog(ex, System.Reflection.MethodBase.GetCurrentMethod().Name); throw; } }
/// <summary> /// This Function Will return all the ID Info types /// </summary> /// <param name="organizationID">organizationID</param> /// <returns></returns> public List <L_IDInformationType> GetIdInfoType(int organizationID) { try { using (var unitOfWork = new EFUnitOfWork()) { var lIdInfoTypeRepo = new L_IDInformationTypeRepository(new EFRepository <L_IDInformationType>(), unitOfWork); ObjectSet <L_IDInformationType> idInformationTypesObjectSet = ((CurrentDeskClientsEntities)lIdInfoTypeRepo.Repository.UnitOfWork.Context).L_IDInformationType; return(idInformationTypesObjectSet.Where(idInfo => idInfo.FK_OrganizationID == organizationID).ToList()); } } catch (Exception ex) { CommonErrorLogger.CommonErrorLog(ex, System.Reflection.MethodBase.GetCurrentMethod().Name); throw; } }