Exemplo n.º 1
0
        public async Task <Lesson> GetLessonAsync(string culture, string id)
        {
            var retrieveOperation = TableOperation.Retrieve <DynamicTableEntity>(culture, id);
            var tableResult       = await this.lessonTable.ExecuteAsync(retrieveOperation);

            ExceptionUtilities.ThowInvalidOperationExceptionIfFalse(tableResult.Result != null, $"Could not find the lesson on ({culture},{id})");
            return(((DynamicTableEntity)tableResult.Result).ToLesson());
        }
Exemplo n.º 2
0
        public async Task <Study> GetStudyAsync(string culture, string title)
        {
            var retrieveOperation = TableOperation.Retrieve <DynamicTableEntity>(culture, title);
            var tableResult       = await this.studyTable.ExecuteAsync(retrieveOperation);

            ExceptionUtilities.ThowInvalidOperationExceptionIfFalse(tableResult.Result != null, $"Could not find the study on ({culture},{title})");
            return(((DynamicTableEntity)tableResult.Result).ToStudy());
        }