Page 1 of 1

Cannot use Concat with LINQ

Posted: Wed 11 Nov 2015 08:41
by asten
Hello!

When running for example the following LINQ query:

Code: Select all

var orders = ctx.Orders.Select(o => new { joined = Devart.Data.MySql.Entity.MySqlFunctions.Concat(o.Notes, o.Name) });
we get an error telling us that "Operand should contain 1 column(s)".

The generated SQL looks like this:

Code: Select all

SELECT 
1 AS C1,
(Extent1.Notes, Extent1.Name) AS C2
FROM `Order` AS Extent1
which is missing the "CONCAT" function call.

The more correct and working SQL should be:

Code: Select all

SELECT 
1 AS C1,
CONCAT(Extent1.Notes, Extent1.Name) AS C2
FROM `Order` AS Extent1
We are using the following:
dotConnect for MySQL 7.6.217
Entity Framework 5.0.0
MariaDB 5.5.33

Is this a bug in dotConnect or are we doing things wrong?

Regards
Andreas

Re: Cannot use Concat with LINQ

Posted: Thu 12 Nov 2015 15:17
by Shalex
Thank you for your report. We have reproduced the bug. We will notify you when it is fixed.

Re: Cannot use Concat with LINQ

Posted: Thu 26 Nov 2015 15:09
by Shalex
The new (8.4.543) build of dotConnect for MySQL is available for download now: http://forums.devart.com/viewtopic.php?f=2&t=32836.