I am trying to call a stored procedure using the framework 6 entity. I get an error message on the output message.
The first random error like "System.Data.Entity.Core.EntityCommandExecutionException" occurred in EntityFramework.SqlServer.dll
using (var context = new PartnerPortalEntities2())
{
var outputParameter = new ObjectParameter("result", typeof(string));
var spresults = context.assignRoles_CreateAccountAndContacts(user.Id, role, user.AccountId, user.AccountName, user.ContactId, user.FirstName, user.LastName, outputParameter);
if(spresults.Equals("1"))
{
}
else
{
}
}
When I do debugging, the control goes to the line where the stored procedure is called, after which we get the above error in the output window and the debugger stops, it never gets into the if statements.
I ran the stored procedure on SQLserver and it works great. Any thoughts that might be a mistake. I created the context by creating code from the database.