DeleteOnSubmit doesnt exist?
Posted
by
Anders Metnik
on Stack Overflow
See other posts from Stack Overflow
or by Anders Metnik
Published on 2011-01-10T19:33:10Z
Indexed on
2011/01/11
18:53 UTC
Read the original article
Hit count: 187
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
Thats my namespaces.. i was looking for System.Data.Linq; but it doesnt seem to be anywhere, and i guess that is what have been moved to System.Linq, since i have access to most other things in Linq. EDIT: found System.Data:Linq, no difference
Here is my method:
public void deleteStudienummer(int studienummer)
{
dbcontent = new DBEntities();
var dQry = from members in dbcontent.Medlemmer
where members.Studienummer == studienummer
select members;
foreach (var member in dQry)
{
dbcontent.***
}
dbcontent.AcceptAllChanges();
Console.WriteLine("delete member should have occured");
}
The * was supposed to be DeleteOnSubmit, but i only have DeleteDatabase and DeleteObject, i tried with object but it doesnt work..
Have also tried dbcontent.Medlemmer.* but still not present.
And AcceptAllChanges() was supposed to be .submitChanges() but that wasnt present either.
© Stack Overflow or respective owner