-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
SqlFunctions -> System.NotSupportedException #106
Comments
Hello @pfaustinopt , Do you think you could provide us a test project with this issue? It will make easier/faster for my developer to getting started for investigating it. We now always ask for a project since we found out that most issues are missing some essential information or are resolved by the requestor when creating it (Even if the issue seem very easy to reproduce, by getting a test project, it allow us to give a faster support and better experience for the support of all our free libraries) Best Regards, Jonathan |
All you have to do is run the test method I provide. |
Thank you for the project @pfaustinopt , We can successfully reproduce it. We started to investigate how it's working with EntityFunctions:
and we will try to replicate the code with SqlFunctions and check if that could be supported using a similar code. Best Regards, Jonathan |
Hello @pfaustinopt , After looking at it, we faced some more issue with your Such as the So even if we make it work, that will in fact doesn't work since the C# value you will save Let me know if that's clear or you need a better explanation. Best Regards, Jonathan |
I was aware of that, that's why on my code I end up using |
Great, We will continue to investigate it more this week. Is seem harder than we first thought. Best Regards, Jonathan |
Just curious if there was any update on this. |
If anybody still stumbles upon this issue, you can try to use Day property from the System.DateTime which seems to be translated to Sql in exactly the same way. |
Any update on this? We found the same issue using |
Hello!
I'm facing a problem with Effort and methods from the SqlFunctions class. In my query repository I've the following expression on a Where clause:
Where( x => x.Weekday == SqlFunctions.DatePart("weekday",date))
When running my unit tests with effort, i get the following message:
System.NotSupportedException: The specified method 'System.Nullable
1[System.Int32] DatePart(System.String, System.Nullable
1[System.DateTime])' on the type 'System.Data.Entity.SqlServer.SqlFunctions' cannot be translated into a LINQ to Entities store expression.Effort does not support the usage of methods from the SqlFunctions class?
The text was updated successfully, but these errors were encountered: