ExecuteFunction does not return expected values RRS feed

  • Question

  • Hi, I am trying to return values from stored procedure which i have setup up in my mvc application.  I am using the following code:

    var findparam = new ObjectParameter("Find", typeof(string)) { Value = entryManagement.originalURL };
    var replaceparam = new ObjectParameter("Replace", typeof(string)) { Value = entryManagement.replaceURL };
    ObjectResult<sp_name> results = _iaffDatabaseContext.ObjectContext.ExecuteFunction<sp_name>("Name", findparam, replaceparam);

    It does return the values, I then insert into dataTable, but when I loop through the column value that should have replaced still returns the original value.  I suppose the parameters don't pass properly to the stored procedure.  

    Can anyone please suggest where to look as the stored procedure returns correct values when run in SQL server.

    Thank you

    Monday, April 13, 2015 10:59 AM