static private GetWidgetDataByRootAll ( CarrotCMSDataContext ctx, Guid rootWidgetID ) : IQueryable |
||
ctx | CarrotCMSDataContext | |
rootWidgetID | Guid | |
return | IQueryable |
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(); } }