public void EmpireMarketSegmentRequestSendEmail() { //string output = ""; ObjectParameter tranDt = new ObjectParameter("TranDT", typeof(DateTime)); ObjectParameter res = new ObjectParameter("Result", typeof(int)); try { _context.usp_QT_EmpireMarketSegment_Request_SendEmail(Segment, tranDt, res); //var collection = _context.usp_QT_EmpireMarketSegment_Request_SendEmail(Segment, 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; } }