I am trying to make a LINQ statement where the where clause comes from a variable. For example:
string whereClause = address.zip == 23456;
var x = from somet
Can try:
var lstQ_Buffer = new List();
Get
lstQ_Buffer = unitOfWork.Q_BufferRepository.Get().ToList();
Then apply where
if (lstQ_Buffer.Count > 0)
{
lstQ_Buffer = lstQ_Buffer.Where(q => q.fkProgramId == programId && q.fkYearId == yearId && q.fkSemesterId == semesterId && q.fkCourse_ModuleId == courseModuleId && q.fkSubject_SpecialtyId == subjectSpecialtyId && q.fkSubSpecialtyId == subSpecialtyId && q.fkTopicId == topicId && q.fkSubTopicId == subTopicId && q.fkDifficultyLevelId == diffucultyLevelId).ToList();
}