I am using entity framework 5
and I've added two stored procedures to my .edmx
model.
The first stored procedure returns a string and if I open the model browser in Visual Studio, I can change the Returns a Collection Of
section and set the scalar type to String, as follows:
Then in the code, I can call the SP and get the result like follows:
using (var context = new MyEntities())
{
var spResult = context.mySPNameFromTheModel(exampleParameter1, exampleParameter2); // This will get the output as string
}
The above example works fine, but how can I do the same with a Complex type?
My second stored procedure returns just one row, with two columns, both strings. So I created a class with two string properties, but I cannot see it when I change to Complex, I cannot select anything from the drop down because it is empty.
When I click on Get Column Information
, it just says that the SP doesn't return any columns, which isn't true.