Is there a better way to write this QueryBuilder? - C#