In a method something like this:
public List<Teachers> GetEligibleTeachers(string fieldname)
{
var query = from t in this.Context.Teachers
// some more joins and logic , etc..
where t.custom_field == true
// .... rest of the query
}
I have hardcoded the name of the field in the where clause to custom_field
but is there is a way I can pass that as a parameter to my method? so for example could have a.custom_field , a.field2 , a.teahcer_id , etc....