Show / Hide Table of Contents

Class QuestionManager

Inheritance
object
DomainService
QuestionManager
Implements
IDomainService
ITransientDependency
Inherited Members
DomainService.LazyServiceProvider
DomainService.ServiceProvider
DomainService.Clock
DomainService.GuidGenerator
DomainService.LoggerFactory
DomainService.CurrentTenant
DomainService.AsyncExecuter
DomainService.Logger
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Forms.Questions
Assembly: Volo.Forms.Domain.dll
Syntax
public class QuestionManager : DomainService, IDomainService, ITransientDependency

Constructors

QuestionManager(IQuestionRepository, IFormRepository)

Declaration
public QuestionManager(IQuestionRepository questionRepository, IFormRepository formRepository)
Parameters
Type Name Description
IQuestionRepository questionRepository
IFormRepository formRepository

Properties

FormRepository

Declaration
protected IFormRepository FormRepository { get; }
Property Value
Type Description
IFormRepository

QuestionRepository

Declaration
protected IQuestionRepository QuestionRepository { get; }
Property Value
Type Description
IQuestionRepository

Methods

ClearItemChoicesAsync(QuestionBase)

Declaration
[UnitOfWork]
public virtual Task ClearItemChoicesAsync(QuestionBase question)
Parameters
Type Name Description
QuestionBase question
Returns
Type Description
Task

CreateItemBasedOnType(QuestionTypes, Guid?)

Declaration
protected virtual QuestionBase CreateItemBasedOnType(QuestionTypes questionType, Guid? id)
Parameters
Type Name Description
QuestionTypes questionType
Guid? id
Returns
Type Description
QuestionBase

CreateQuestionAsync(Form, QuestionTypes, int, bool, string, string, bool, List<(string value, bool isCorrect)>)

Declaration
public virtual Task<QuestionBase> CreateQuestionAsync(Form form, QuestionTypes questionType, int index, bool isRequired, string title, string description, bool hasOtherOption, List<(string value, bool isCorrect)> choices)
Parameters
Type Name Description
Form form
QuestionTypes questionType
int index
bool isRequired
string title
string description
bool hasOtherOption
List<(string value, bool isCorrect)> choices
Returns
Type Description
Task<QuestionBase>

DeleteAsync(QuestionBase)

Declaration
public virtual Task DeleteAsync(QuestionBase question)
Parameters
Type Name Description
QuestionBase question
Returns
Type Description
Task

InsertAsync(Guid, QuestionTypes, int, bool, string, string, bool, List<(string value, bool isCorrect)>, Guid?)

Declaration
protected virtual Task<QuestionBase> InsertAsync(Guid formId, QuestionTypes questionType, int index, bool isRequired, string title, string description, bool hasOtherOption, List<(string value, bool isCorrect)> choices, Guid? id)
Parameters
Type Name Description
Guid formId
QuestionTypes questionType
int index
bool isRequired
string title
string description
bool hasOtherOption
List<(string value, bool isCorrect)> choices
Guid? id
Returns
Type Description
Task<QuestionBase>

UpdateAsync(Guid, string, int, bool, string, QuestionTypes, bool, List<(Guid Id, string value, bool isCorrect)>)

Declaration
public virtual Task<QuestionBase> UpdateAsync(Guid id, string title, int index, bool isRequired, string description, QuestionTypes questionType, bool hasOtherOption, List<(Guid Id, string value, bool isCorrect)> choiceList)
Parameters
Type Name Description
Guid id
string title
int index
bool isRequired
string description
QuestionTypes questionType
bool hasOtherOption
List<(Guid Id, string value, bool isCorrect)> choiceList
Returns
Type Description
Task<QuestionBase>

UpdateFormLastModificationDateAsync(Guid)

Declaration
protected virtual Task UpdateFormLastModificationDateAsync(Guid createdQuestionFormId)
Parameters
Type Name Description
Guid createdQuestionFormId
Returns
Type Description
Task

UpdateIndexesOfChoiceList(List<(Guid Id, string value, bool isCorrect)>)

Declaration
protected virtual void UpdateIndexesOfChoiceList(List<(Guid Id, string value, bool isCorrect)> choiceList)
Parameters
Type Name Description
List<(Guid Id, string value, bool isCorrect)> choiceList

Implements

IDomainService
ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform