Reputation: 51
I am looking to implement something like the following:
string searchValue = "Jun";
var users = context.Users
.Where(x => x.BirthDate.SomeWhackySqlFunction(searchTerm))
.ToList();
where SomeWhackySqlFunction
maps to a function or stored procedure in SQL Server that takes 2 parameters:
value: DateTime
(in the sample code above it would be the value of birthDate).searchTerm: string
This is to get around limitations with EF , alternatively if I could extend the DbFunctions or SqlFunctions class, this could also do the trick.
Upvotes: 1
Views: 93