Skip to content

SqlFunctions -> System.NotSupportedException #106

@pfaustinopt

Description

@pfaustinopt

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.Nullable1[System.Int32] DatePart(System.String, System.Nullable1[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?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions