The following code is what I use to initialize the stored procedure, then obtain the result into variable returnedResult, which in this case is the record id of a newly created record.
SqlParameter paramResult = new SqlParameter("@Result", -1);
paramResult.Direction = System.Data.ParameterDirection.Output;
var addParameters = new List<SqlParameter>
{
new SqlParameter("@JobID", EvalModel.JobID),
new SqlParameter("@SafetyEvaluator", EvalModel.SafetyEvaluator),
new SqlParameter("@EvaluationGuid", EvalModel.EvaluationGuid),
new SqlParameter("@EvalType", EvalModel.EvalType),
new SqlParameter("@Completion", EvalModel.Completion),
new SqlParameter("@ManPower", EvalModel.ManPower),
new SqlParameter("@EDate", EvalModel.EDate),
new SqlParameter("@CreateDate", EvalModel.CreateDate),
new SqlParameter("@Deficiency", EvalModel.Deficiency.HasValue ? EvalModel.Deficiency.Value : 0),
new SqlParameter("@DeficiencyComment", EvalModel.DeficiencyComment != null ? EvalModel.DeficiencyComment : ""),
new SqlParameter("@Traffic", EvalModel.Traffic.HasValue ? EvalModel.Traffic.Value : 0),
paramResult
};
// Stored procedure name is AddEval
context.Database.ExecuteSqlCommand("AddEval @JobID, @SafetyEvaluator, @EvaluationGuid, @EvalType, @Completion, @ManPower, @EDate, @CreateDate, @Deficiency, @DeficiencyComment, @Traffic, @Result OUTPUT", addParameters.ToArray());
var returnedResult = paramResult.Value;
NewEvaluationID = Convert.ToInt32(returnedResult);