protected void btn5_Click(object sender, EventArgs e) { using (EStoreEntities ctx5 = new EStoreEntities()) { var query =(from o in ctx5.Order_Details.Include("Order") select o); //Order-navigation property tb5.Text = (queryas ObjectQuery).ToTraceString(); gv5.DataSource = query; gv5.DataBind(); } }
<asp:Button ID="btn5" runat="server" Text="Button" onclick="btn5_Click" /> <asp:GridView ID="gv5" runat="server"></asp:GridView> <asp:TextBox ID="tb5" runat="server" TextMode="MultiLine"></asp:TextBox>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)