public override void Remove(Expression <Func <T, bool> > filter) { BeginTransaction(() => { base.Remove(filter); WidgetBasePartService.Remove(Expression.Lambda <Func <WidgetBase, bool> >(filter.Body, filter.Parameters)); }); }
public override void Remove(T item) { BeginTransaction(() => { base.Remove(item); WidgetBasePartService.Remove(item.ID); }); }
public override ServiceResult <T> Add(T item) { item.ID = Guid.NewGuid().ToString("N"); WidgetBasePartService.Add(item.ToWidgetBasePart()); try { return(base.Add(item)); } catch (Exception ex) { WidgetBasePartService.Remove(item.ID); throw ex; } }
public override ServiceResult <T> Add(T item) { ServiceResult <T> result = null; BeginTransaction(() => { var id = Guid.NewGuid().ToString("N"); var basePart = item.ToWidgetBasePart(); basePart.ID = id; WidgetBasePartService.Add(basePart); try { item.ID = basePart.ID; result = base.Add(item); } catch (Exception ex) { WidgetBasePartService.Remove(item.ID); throw ex; } }); return(result); }
public override void Remove(T item) { WidgetBasePartService.Remove(item.ToWidgetBasePart()); Signal.Trigger(CacheTrigger.WidgetChanged); }
public override void Remove(Expression <Func <T, bool> > filter) { WidgetBasePartService.Remove(Expression.Lambda <Func <WidgetBasePart, bool> >(filter.Body, filter.Parameters)); Signal.Trigger(CacheTrigger.WidgetChanged); }
public override void Remove(T item, bool saveImmediately = true) { WidgetBasePartService.Remove(item.ID); }
public override void Remove(Expression <Func <T, bool> > filter) { WidgetBasePartService.Remove(Expression.Lambda <Func <WidgetBasePart, bool> >(filter.Body, filter.Parameters)); }
public override void Remove(T item) { WidgetBasePartService.Remove(item.ID); }
public override void Remove(T item, bool saveImmediately = true) { base.Remove(item, saveImmediately); WidgetBasePartService.Remove(item.ToWidgetBasePart()); }