I’m trying to update my LinqDataSource Object through my GridPanel
<asp:LinqDataSource
ID="LinqDataSource1"
runat="server"
ContextTypeName="IntraNET_Prototype.IntraNetEntities"
TableName="EmployeeList"
EnableDelete="True" EnableInsert="True" EnableUpdate="True" />
Any time I’m trying to update something when my GridPanel fires the event and triggers the update I get the following Error Message:
System.Exception: The data context used by LinqDataSource ‘LinqDataSource1’ must extend DataContext when the Delete, Insert or Update operations are enabled.
I’m using LinqToEntities, any Idea what’s going wrong and how to enable that?
Thanks!
LinqDataSourceis for ‘general’ Linq queries.You can use it but then you have to implement Update and Delete yourself, as the error indicates.
To use an ADO Entities source, use the
EntityDataSource.For Linq2Sql, use
SqlDataSource.