0
public bool DeleteLoc(int Location_Id)
{
DataClassesLocationDataContext dc = new DataClassesLocationDataContext();
Location loc = dc.Locations.Single(u => u.Location_id == Location_Id);
dc.Locations.DeleteOnSubmit(loc);
dc.SubmitChanges();
return true;
}
public bool DeleteComp(int Company_Id)
{
DataClassesLocationDataContext dc = new DataClassesLocationDataContext();
**Company com = dc.Comp.Single(u => u.Location_id == Location_Id);**
}
在這一行就不會顯示像在以前的代碼中的位置LINQ的,當我們創建對象
爲什麼它不能顯示你正在使用linq to sql
你明白了嗎? – 2012-02-10 07:34:26