Dixin / EntityFramework.Functions

EntityFramework.Functions library implements Entity Framework code first support for stored procedures (with single result type, multiple result types, output parameter), table-valued functions (returning entity type, complex type), scalar-valued functions (composable, non-composable), aggregate functions, built-in functions, niladic functions, and model defined functions.
https://weblogs.asp.net/Dixin/EntityFramework.Functions
MIT License
79 stars 27 forks source link

How to use BuiltInFunction with Cast or Convert #21

Closed kcjhendriks closed 7 years ago

kcjhendriks commented 7 years ago

How Does one setup the build in function to support the build in cast or conver functions? msdn link

So far I have this

[Function(FunctionType.BuiltInFunction, "CAST")] public static double Cast(string value) => Function.CallNotSupported<double>();

modelBuilder.Conventions.Add(new FunctionConvention<VProCressContext>()); modelBuilder.AddFunctions(typeof(MySQLFunctions));

But I do not know how to supply the type that is needed with the cast

Dixin commented 7 years ago

I have added an example for cast. Please see 8c0ea5a5a80b32a00471515790728ce3e32c30a9.