Code First support for user defined functions (UDFs)
Similar to adding support for stored procedures in Code First, but for functions also.
Using model first, this is supported and using EdmFunctionAttribute they can be used from LINQ to Entities. I really miss this in the Code First approach.
UPDATE: Reverting status from “under review” to “no status” since we aren’t currently working on this. We will still consider it for future releases.
UPDATE: EF6 now supports mapping stored procedures for CUD operations. More complete function support in Code First was postponed for schedule reasons.
The plan is to add support in Code First for all the same kind of functions that are supported by the core runtime, including stored procedures, user defined functions, and table valued functions.
David Lemieux commented
Five years later this is still a requirement. Please implement. Thanks.
when will UDF be available for code first, this is a real limitation when writing linq queries and not being able to use UDF's as part
Andrés Vettori commented
Any news about this support? are you guys working on this?
Fabien Molinet commented
We really miss this feature in Code First or Fluent API. Is it still on the EF6 roadmap?
Andy Edinborough commented
Has this landed in EF6 alpha 3?