I have a method that uses output from a stored procedure as input to another.
ObjectParameter output = new ObjectParameter("IncidentID",typeof(Int32));
_db.InsertInitialInfo(startTime, endTime, output);
//int outputInt = Convert.ToInt32(output); ---> Doesnt work -
System.InvalidCastException
List<string> errorList = _db.GetErrorMessage(outputInt).ToList();
How do I convert the ObjectParameter that has an integer value into an integer?