You can use one of two overloads of method Delete; Passing a Entity or with where parameters.

private void DeleteButton_Click(object sender, EventArgs e)
{
  Northwind.Business.Tables.dbo.Categories entities = new 
  Northwind.Business.Tables.dbo.Categories();
  entities.Where.Add(Northwind.Business.Tables.dbo.Categories.ColumnEnum.CategoryID,
  sqlEnum.OperandEnum.Equal, CategoryLabel.Text);
  entities.Items();
  if (entities.Result.Count > 0)
     {
       entities.Delete(entities.Result.First());
       CategoryLabel.Text = entities.Result.First().CategoryID.ToString();
     }
     LoadCategories();
}

Last edited Nov 29, 2015 at 9:36 PM by cdcespon, version 1