title: Mongo C# where condition automatic cast converting
body: <p>I have a LINQ query to select data from mongoDB. In mongoDB, EmpID is stored using different types like int16, int32, int64, string etc.
  I always pass EmpID as string to a where condition. It is returning null when that EmpID is stored in NonString type. How to auto cast for these type of case ?</p>
  
  <pre><code>var query = from c in collection.AsQueryable&lt;C&gt;() where c[EmpID] == "123" select c;
  </code></pre>