public void DeleteAll(Guid rootWidgetID)
{
IQueryable <carrot_WidgetData> w1 = CannedQueries.GetWidgetDataByRootAll(db, rootWidgetID);
carrot_Widget w2 = CompiledQueries.cqGetRootWidget(db, rootWidgetID);
bool bPendingDel = false;
if (w1 != null)
{
db.carrot_WidgetDatas.BatchDelete(w1);
bPendingDel = true;
}
if (w2 != null)
{
db.carrot_Widgets.DeleteOnSubmit(w2);
bPendingDel = true;
}
if (bPendingDel)
{
db.SubmitChanges();
}
}