jonpryor / dblinq2007

Automatically exported from code.google.com/p/dblinq2007
0 stars 0 forks source link

The binary operator GreaterThan is not defined for the types 'System.Int32' and 'System.Int64'. #325

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create table with column named 'Count' of type 'Int64'
2. Use it in any part of the query

Example
[Table]
class Foo
{
  [Column]
  public string Bar;
  [Column]
  public long Count;
}

var count = (from f in db.Foo
             where f.Bar == "Fred"
              && f.Count  > Convert.ToInt64(0L)             
             select f).FirstOrDefault();

What is the expected output? What do you see instead?

If used in where predicate:
  The binary operator GreaterThan is not defined for the types 'System.Int32' and 'System.Int64'.
(see dblinq-stack.txt)

What version of the product are you using? On what operating system?
DbLinq: 0.20.0.0

Original issue reported on code.google.com by itsnatet...@gmail.com on 19 Feb 2012 at 9:43

Attachments:

GoogleCodeExporter commented 9 years ago
Incase it matters:
MySql.Data 6.4.4.0
NET v4.0.30319

Original comment by itsnatet...@gmail.com on 19 Feb 2012 at 9:48

GoogleCodeExporter commented 9 years ago
pudiste resolverlo?

Original comment by juan_lip...@msn.com on 31 Aug 2012 at 8:44

GoogleCodeExporter commented 9 years ago
Nope, here is the most direct repro code..

from x in db.Table
where ((int)x.Number) == (long)number
select x;

Original comment by itsnatet...@gmail.com on 22 Oct 2012 at 11:00