Note that there are some explanatory texts on larger screens.

plurals
  1. POASP.Net Linq getting Column Names and Data
    primarykey
    data
    text
    <p>I am trying to create a system as follows -</p> <ol> <li><p>UI layer - dropdowns with options to filter the data to be shown</p></li> <li><p>Mid layer - ".cs" classes to manipulate the data</p></li> <li><p>Back Layer - here the data gets filtered and returned into classes (EDMX file and classes)</p></li> </ol> <p>However my implementation is not working... the error is shown as "Reference for different contexts"..</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { inc = (IQueryable&lt;Incident_Raw_Data&gt;)Session["INC"]; AppInfo = (IQueryable&lt;Application_Info&gt;)DbData.GetDBData().AppInfo; RespConfg = (IQueryable&lt;Response_Config&gt;)DbData.GetDBData().RespConfig; ResolConfg = (IQueryable&lt;Resolution_Config&gt;)DbData.GetDBData().ResolConfig; DTbl = QueryRslt(xyz, abc); Data = GetData(); Cols = Col(); } </code></pre> <p>Never mind any return statements missing ;;</p> <pre><code>public DataTable QueryRslt(string Type, string Value) { if (!string.IsNullOrEmpty(Type)) { var str = (from IR in inc join AI in AppInfo on IR.CI equals AI.Application_Name join RC in RespConfg on AI.Service_Level_Categoty equals RC.Category where (RC.Tkt_Type == "Incident" &amp;&amp; IR.Priority == Value) select new { ID = IR.Incident_ID, CI = IR.CI, Status = IR.Status, BenchMark_Response_Time = RC.Days_Benchmark, SLMDeviation = ((EntityFunctions.DiffHours(IR.Incident_Reported_Date, IR.Incident_Responded_Date) / 24.0) - RC.Days_Benchmark), Priority = IR.Priority, ReportedDate = IR.Incident_Reported_Date, RespondDate = IR.Incident_Responded_Date, AssigneeGroup = IR.Assignee, AssignedGroup = IR.Assigned_Group }).ToList(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload