I have a query:
var q = (from c in session.db.students
where c.id==5
select c);
How can I delete this record? I've tried deleteonsubmit
, deleteobject
, delete
... but none of them are not known.
For example in code below, delete not known:
foreach (student s in q)
{ s.deleteobject;}
session.db.savechanges();
or:
var q = (from c in session.db.students
where c.id==5
select c).deleteOnSubmit();
None of them is not defined.... where is the problem?