This project is read-only.

Custom Stored procedure

Sep 30, 2013 at 11:40 AM
I've created a custom stored procedure and during modelling, nhydrate modeler throw an error saying there must be at least one field. I've tried going through the documentation and couldn't find how do i create that field, in the issue list, i saw someone doing something like this:
exec sp_executesql @query

--Added this because entity framework will not accept sp without return
SET @Result = 1
RETURN @Result 
Just to satisfy the modelling tool, and i manually added a new Field during the modelling called "res"

But when i tried to execute the stored procedure, thrown back with this error:
The data reader is incompatible with the specified 'MyCustomStoredProcedureColumn'. A member of the type, 'res', does not have a corresponding column in the data reader with the same name.
I'm very impressed by all the capabilities that this ORM brings, but even in the source code examples, there are no samples showing this, can anyone help please
Nov 7, 2013 at 12:54 PM
In the modeler open the nHydrate model canvas. Select the stored proc item and right click on the header. There will be an option to create field. Add a field there so that the model knows about it.