Entity Framework Core – Custom Functions (Using HasDbFunction)

In the previous post (Custom Functions – using IMethodCallTranslator) we looked at the more flexible approach that requires some boilerplate code. For the usage of a custom function in a project, especially if there are no plans to make the function public then the sacrifice of some (not required) flexibility to reduce the amount of code is fully acceptable.