This question is locked. New answers and comments are not allowed.
I am using the OpenAccess Domain Model method, which creates the EntityDiagrams.rlinq file in my project. I cannot find a way to delete several rows from my sql database connection.
Here is what I am using:
using System.Linq;
using System.Data.Linq;
using Telerik.OpenAccess;
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var delRecords = from c in datab.Customers where c.City == "San Francisco" select c;
datab.Delete(delRecords);
datab.SaveChanges();
}
}
This gets an error. I also tried using System.Data.Linq and DeleteOnSubmit, but I do not think that the DeleteOnSubmit method works with EntityDiagrams. Any help would be appreciated. Thanks.
Here is what I am using:
using System.Linq;
using System.Data.Linq;
using Telerik.OpenAccess;
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
var delRecords = from c in datab.Customers where c.City == "San Francisco" select c;
datab.Delete(delRecords);
datab.SaveChanges();
}
}
This gets an error. I also tried using System.Data.Linq and DeleteOnSubmit, but I do not think that the DeleteOnSubmit method works with EntityDiagrams. Any help would be appreciated. Thanks.