private static IEnumerable <QuestionRow> GetSurveyQuestionRowsByTenantAndSlugName(IAzureTable <QuestionRow> questionTable, string tenant, string slugName) { var paritionKey = string.Format(CultureInfo.InvariantCulture, "{0}_{1}", tenant, slugName); var query = from q in questionTable.Query where q.PartitionKey == paritionKey select q; return(questionTable.GetRetryPolicyFactoryInstance().GetDefaultAzureStorageRetryPolicy().ExecuteAction <IEnumerable <QuestionRow> >(() => query.ToList())); }
private static SurveyRow GetSurveyRowByTenantAndSlugName(IAzureTable <SurveyRow> surveyTable, string tenant, string slugName) { var rowKey = string.Format(CultureInfo.InvariantCulture, "{0}_{1}", tenant, slugName); var query = from s in surveyTable.Query where s.RowKey == rowKey select s; return(surveyTable.GetRetryPolicyFactoryInstance().GetDefaultAzureStorageRetryPolicy().ExecuteAction <SurveyRow>(() => query.SingleOrDefault())); }
private static SurveyRow GetSurveyRowByTenantAndSlugName(IAzureTable<SurveyRow> surveyTable, string tenant, string slugName) { var rowKey = string.Format(CultureInfo.InvariantCulture, "{0}_{1}", tenant, slugName); var query = from s in surveyTable.Query where s.RowKey == rowKey select s; return surveyTable.GetRetryPolicyFactoryInstance().GetDefaultAzureStorageRetryPolicy().ExecuteAction<SurveyRow>(() => query.SingleOrDefault()); }
private static IEnumerable<QuestionRow> GetSurveyQuestionRowsByTenantAndSlugName(IAzureTable<QuestionRow> questionTable, string tenant, string slugName) { var paritionKey = string.Format(CultureInfo.InvariantCulture, "{0}_{1}", tenant, slugName); var query = from q in questionTable.Query where q.PartitionKey == paritionKey select q; return questionTable.GetRetryPolicyFactoryInstance().GetDefaultAzureStorageRetryPolicy().ExecuteAction<IEnumerable<QuestionRow>>(() => query.ToList()); }