Home

string_agg use in MSSQL

According to this link, starting in EF Core 7.0, both string.Concat and string.Join should translate to using the string_agg function on the database. But when I use that in LINQPad 8 with .NET 8, the generated SQL reported in LINQPad is not showing use of the string_agg function. Is this a LINQPad driver issue that can be fixed?

Example LINQ:
Products
.Select(x => new
{
ProductName = x.Name,
Markets = string.Concat(x.ProductMarkets.Select(y => y.Market.Code))
})

https://learn.microsoft.com/en-us/ef/core/providers/sql-server/functions

Comments

Sign In or Register to comment.