I know a typical way is like this:
IQueryable query = from staff in dataContext.Staffs; if(name1 != null) { query = from staff in query where (staff.nam
I like the idea with Extension
public static IQueryable WhereIf(this IQueryable query, bool condition, Expression> whereClause) => condition ? query.Where(whereClause) : query;