Todd
Todd

Reputation: 51

Entity Framework 6 code-first - map function or stored procedure to primitive types

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:

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

Answers (0)

Related Questions