dotConnect for Salesforce does not honor the Take operator (EF Core)

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Cloud Applications
Post Reply
mcartoixa
Posts: 4
Joined: Thu 23 Aug 2018 16:01

dotConnect for Salesforce does not honor the Take operator (EF Core)

Post by mcartoixa » Wed 29 Aug 2018 15:44

I am in the process of trying the latest version of dotConnect for Salesforce (.NET 4.7.1, EF Core) and the following query does not seem to honor the Take operator:

Code: Select all

return await _Context.Cases.AsNoTracking().Take(10).ToListAsync();
I get the whole database back instead of just 10 items. Adding an OrderBy has no effect.

In the logs I see the following output:

Code: Select all

Microsoft.EntityFrameworkCore.Database.Command: Information: Executed DbCommand (2,778ms) [Parameters=[__p_0='?' (DbType = Int32)], CommandType='Text', CommandTimeout='60']
SELECT TOP(:__p_0) "c"."Id", "c"."CaseNumber"
FROM "Case" AS "c"
Known limitation, or bug?
Last edited by mcartoixa on Thu 30 Aug 2018 10:10, edited 1 time in total.

mcartoixa
Posts: 4
Joined: Thu 23 Aug 2018 16:01

Re: dotConnect for Salesforce does not honor the Take operator (EF Core)

Post by mcartoixa » Thu 30 Aug 2018 10:09

I have managed to make the previous code work with EF 6, so this looks like a bug in the EF Core provider.

Post Reply