예제 #1
0
        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()));
        }
예제 #2
0
        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()));
        }
예제 #3
0
        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());
        }
예제 #4
0
        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());
        }