Example #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()));
        }
Example #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()));
        }
Example #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());
        }
Example #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());
        }