public void EmpireMarketSubsegmentRequestSendEmail() { //string output = ""; ObjectParameter tranDt = new ObjectParameter("TranDT", typeof(DateTime)); ObjectParameter res = new ObjectParameter("Result", typeof(int)); try { _context.usp_QT_EmpireMarketSubsegment_Request_SendEmail(Subsegment, tranDt, res); //var collection = _context.usp_QT_EmpireMarketSubsegment_Request_SendEmail(Subsegment, tranDt, res); //foreach (var item in collection) output = item.ToString(); //ErrorMessage = output; } catch (Exception ex) { ErrorMessage = (ex.InnerException != null) ? "Request failed. " + ex.InnerException.Message : "Request failed. " + ex.Message; } }