public void GetSpecialReqNotes() { ObjectParameter tranDT = new ObjectParameter("TranDT", typeof(DateTime?)); ObjectParameter result = new ObjectParameter("Result", typeof(Int32?)); Error = ""; string quote = (System.Web.HttpContext.Current.Session["Quote"] != null) ? quote = System.Web.HttpContext.Current.Session["Quote"].ToString() : ""; NotesList = new List <QtSpecialReqNotesDataModel>(); try { using (var context = new MONITOREntitiesQuoteLogIntegrationQuoteTransfer()) { var collection = context.usp_QL_QuoteTransfer_GetSpecialReqNotes(quote, tranDT, result); foreach (var item in collection) { var dataModel = new QtSpecialReqNotesDataModel { RowID = item.RowID, Description = item.Description, Answer = item.Answer, Notes = item.Notes }; NotesList.Add(dataModel); } } } catch (Exception ex) { Error = (ex.InnerException != null) ? ex.InnerException.Message : ex.Message; } }