protected override Question ExecuteProcedure() { var repository = Repository.Create <IQuestionRepository>(); var obj = repository.Find(_id, QueryLevel.Single); if (this.Content != null) { obj.Content = this.Content; } if (this.Type != null) { obj.Type = this.Type.Value; } if (this.Options != null) { obj.Options = CreateQuestion.GetOptions(this.Options); } repository.Update(obj); return(obj); }
public CreateQuestionByMetadata(Guid paperMetadataId, CreateQuestion createQuestionDefinition) { _paperMetadataId = paperMetadataId; _createQuestionDefinition = createQuestionDefinition; }