Home Why doesn't my WebAPI endpoint not return the expected output
 I have an API with one Get action which looks like the following: public string GetSearchEshtrak(string A_SHENASEHG) { var sample1 = new ObjectParameter("oUTSHENASEHP", typeof(string)); var sample2 = new ObjectParameter("oUTAMT", typeof(int)); var model2 = db.USSD_100(A_SHENASEHG, sample1, sample2).ToString(); return (model2); }  Everything appears to run correctly and I see my my USSD_100 method is also returning the expected results. However, when calling the endpoint with my browser Firefox the result is as follows: -1  This XML is not what I expected it to be and doesn't has any information from the model2 object. What do I have to do to return the model2 correctly, so I can see the model object as XML in the browser.