-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SingleOrDefault or FirstOrDefault does not work #43
Comments
Thanks for the workaround! About your issue, the queries are generated by the provider not by Entity Framework. |
About JetEntity generating the SQL, I later took a look around the repository and noticed that (I'm new to Open source). If it's any help, the Sql Generated is as follows: SELECT TOP 2 [Extent1].[Id] AS [Id], [Extent1].[Description] AS [Description], [Extent1].[ReportId] AS [ReportId] FROM ( ( SELECT 1 AS X FROM (SELECT COUNT(*) FROM MSysAccessStorage) ) AS [SingleRowTable1] LEFT OUTER JOIN [ChartOfAccountTypes] AS [Extent1] ON (true = true)) WHERE ([Extent1].[Description] = @p__linq__0) OR (([Extent1].[Description] IS NULL) AND (@p__linq__0 IS NULL)) -- p__linq__0: 'Sales' (Type = AnsiString, Size = 5) -- Executing at 22/03/2019 11:14:28 AM -04:00 It seems the error is actually |
I think so. |
The Linq Function "DefaultIfEmpty" does not work with JetEntityFrameworkProvider. Upon investigation, the reason is that EntityFramework uses "LEFT OUTER JOIN" in the expression, which is not supported in Access.
For Example:
As a caveat, this is a problem with Access, not JetEntityFrameworkProvider. The workaround I am using is the following extension method:
The text was updated successfully, but these errors were encountered: