static private GetWidgetsByRootContent ( CarrotCMSDataContext ctx, Guid rootContentID ) : IQueryable |
||
ctx | CarrotCMSDataContext | |
rootContentID | Guid | |
return | IQueryable |
public void SetStatusList(Guid rootContentID, List <Guid> lstWidgetIDs, bool widgetStatus) { IQueryable <carrot_Widget> queryWidgets = (from w in CannedQueries.GetWidgetsByRootContent(db, rootContentID) where lstWidgetIDs.Contains(w.Root_WidgetID) && w.WidgetActive != widgetStatus select w); db.carrot_Widgets.BatchUpdate(queryWidgets, p => new carrot_Widget { WidgetActive = widgetStatus }); db.SubmitChanges(); }