修改查询条件
This commit is contained in:
@@ -65,6 +65,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
///<summary> TypeValue</summary>
|
||||
public string Type { get; set; }=String.Empty;
|
||||
|
||||
public bool? IsEnable { get; set; }
|
||||
|
||||
public bool? IsRequired { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
var trialQCQuestionQueryable = _trialQcQuestionRepository.Where(t => t.TrialId == queryTrialQCQuestionConfigure.TrialId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.QuestionName), t => t.QuestionName.Contains(queryTrialQCQuestionConfigure.QuestionName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(queryTrialQCQuestionConfigure.Type), t => t.Type.Contains(queryTrialQCQuestionConfigure.Type))
|
||||
.WhereIf(queryTrialQCQuestionConfigure.IsEnable!=null, t => t.IsEnable== queryTrialQCQuestionConfigure.IsEnable)
|
||||
.WhereIf(queryTrialQCQuestionConfigure.IsRequired != null, t => t.IsRequired == queryTrialQCQuestionConfigure.IsRequired)
|
||||
|
||||
|
||||
.ProjectTo<TrialQCQuestionConfigureView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await trialQCQuestionQueryable.OrderBy(t => t.ShowOrder).ToListAsync();
|
||||
|
||||
Reference in New Issue
Block a user