public int?GetDepartmentIdForStripeCustomerId(string stripeCustomerId, bool bypassCache = false) { DepartmentSetting key; Func <DepartmentSetting> getSetting = delegate() { return(_departmentSettingsRepository.GetDepartmentSettingBySettingType(stripeCustomerId, DepartmentSettingTypes.StripeCustomerId)); }; if (!bypassCache && Config.SystemBehaviorConfig.CacheEnabled) { key = _cacheProvider.Retrieve <DepartmentSetting>(string.Format(StripeCustomerCacheKey, stripeCustomerId), getSetting, TwoYearCacheLength); } else { key = getSetting(); } if (key != null) { return(key.DepartmentId); } return(null); }
public int?GetDepartmentIdForStripeCustomerId(string stripeCustomerId) { var key = _departmentSettingsRepository.GetDepartmentSettingBySettingType(stripeCustomerId, DepartmentSettingTypes.StripeCustomerId); if (key != null) { return(key.DepartmentId); } return(null); }