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.
This was partially impemented in EF Core 2.0 (mapping scalar database functions to static methods) and additional improvements have been made in 2.1 (e.g.instance methods).
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?