HI, I'm using SQL server and I'm wondering if Is it possible to import a stored procedure as Class in Entity developer? (in this way I can use SP to query/insert/update/delete)
Thank you
Stored Procedure as a Class
Re: Stored Procedure as a Class
You can map the result set of your stored procedure to a complex type in your model. Refer to https://www.devart.com/linqconnect/docs ... rview.html.
Re: Stored Procedure as a Class
Ok but with a complex type I cannot see the option "Stored Procedure Mapping" that I see under "Classes" and that's my need: am I missing something?Shalex wrote: ↑Tue 29 Jan 2019 15:00 You can map the result set of your stored procedure to a complex type in your model. Refer to https://www.devart.com/linqconnect/docs ... rview.html.
Re: Stored Procedure as a Class
That is designed behavior. Complex type does not duplicate the functionality of a class. Complex type just represents several properties of a class or the result set of a stored procedure.
Workarounds:
1) create a view in the database that represents a result set of your stored procedure, add it to the model and assign to Return Type of the method via Method Editor
2) create a class in your model (without a view in the database) and use it as Return Type
3) open *.lqml with an XML Editor and modify an existing complex type to transform it into a class
Workarounds:
1) create a view in the database that represents a result set of your stored procedure, add it to the model and assign to Return Type of the method via Method Editor
2) create a class in your model (without a view in the database) and use it as Return Type
3) open *.lqml with an XML Editor and modify an existing complex type to transform it into a class