Sorry for the delay.
Could you please specify the ORM solution you are working with? For example, to call table-valued functions via LinqConnect, you can perform the following:
- Add the function to the model (for example, drag and drop the package from the Database Explorer tool window to the model canvas).
- At this moment, you will be prompted to get the metadata of the function's result set. If you agree to do this, a complex type representing the RTest record type will be created. Besides that, Entity Developer will create a method wrapping calls to the procedure.
- To execute the function, you can just call this wrapper method from an instance of DataContext, e.g.,
Code: Select all
MyDataContext context = new MyDataContext() { Log = Console.Out };
var list = context.GetSelected("John Smith").ToList();
If you encounter any problems with this, could you please describe them in more details?