LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Problems comparing dates in Single and First statement

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
motaboyrs
Posts: 3
Joined: Mon 31 Oct 2011 17:38

LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Problems comparing dates in Single and First statement

Post by motaboyrs » Tue 03 Dec 2013 18:03

Hello.

When we upgraded Devart LinqConnect to 4.4.374, we discovered a bug when comparing dates.

For example:
listResults.FirstOrDefault(f => f.StartDate == DateTime.Now); // This works fine
listResults.FirstOrDefault(f => DateTime.Now == f.StartDate); // This throws an error: InvalidCastException.

In the version 4.1.169 it was working.

I have an example solution. How can I send it to you?

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Problems comparing dates in Single and First statement

Post by MariiaI » Wed 04 Dec 2013 09:26

Thank you for the report on this. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: LinqConnect Professional Version 4.4.374 (14-Nov-2013) - Problems comparing dates in Single and First statement

Post by MariiaI » Fri 13 Dec 2013 06:25

The bug with the comparison of constant with the column value, when the constant is on the left of the comparison operator, is fixed.
New build of LinqConnect 4.4.393 is available for download now!
It can be downloaded from http://www.devart.com/linqconnect/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=31&t=28506.

Post Reply