Reputation: 5196
Q1.Can LINQ to Entity perform create, update or delete operations on a table without a primary key.??
if not then suggest me an alternate
Q2.I am not able to use DeleteObject to delete a row from a table (error::missing an assembly). What should i do to use DeleteObject.
As an alternate to q2.(delete object) i trieddb.check_master.Remove(checks);
(error:: Unable to update the EntitySet 'entitysetName' because it has a DefiningQuery and no element exists in the element to support the current operation)
Not able to access any object provided by EF like Attach,DeleteObject...etc. (Using code first with existing database approach)
Upvotes: 0
Views: 1281
Reputation: 1702
It would be really convenient to you if you add primary key.
Perhaps otherwise, you'll need to use DataContext.ExecuteCommand()
.
Upvotes: 2