title: PostgreSQL, Linq C# error 'could not determine data type of parameter $1'
body: <p>I am getting this error <code>"could not determine data type of parameter $1"</code>
  and my where clause where I am getting the error is like the following:</p>
  
  <pre><code>var result = from Table in model.Table 
                               where (filter.XId.HasValue ? Table.XId == filter.XId: true)
  
                               select new TableEntity
                               {
                                   ID = Table.XId
                               };
  </code></pre>
  
  <p>If my code was only like this 'Table.X == filter.X', it works ...
  How can I fix this?</p>
  
  <p>and I am getting this problem only with PostgreSQL database ....</p>