예제 #1
0
        public override void Remove(Expression <Func <T, bool> > filter)
        {
            BeginTransaction(() =>
            {
                base.Remove(filter);

                WidgetBasePartService.Remove(Expression.Lambda <Func <WidgetBase, bool> >(filter.Body, filter.Parameters));
            });
        }
예제 #2
0
        public override void Remove(T item)
        {
            BeginTransaction(() =>
            {
                base.Remove(item);

                WidgetBasePartService.Remove(item.ID);
            });
        }
예제 #3
0
 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;
     }
 }
예제 #4
0
        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);
        }
예제 #5
0
 public override void Remove(T item)
 {
     WidgetBasePartService.Remove(item.ToWidgetBasePart());
     Signal.Trigger(CacheTrigger.WidgetChanged);
 }
예제 #6
0
 public override void Remove(Expression <Func <T, bool> > filter)
 {
     WidgetBasePartService.Remove(Expression.Lambda <Func <WidgetBasePart, bool> >(filter.Body, filter.Parameters));
     Signal.Trigger(CacheTrigger.WidgetChanged);
 }
예제 #7
0
 public override void Remove(T item, bool saveImmediately = true)
 {
     WidgetBasePartService.Remove(item.ID);
 }
예제 #8
0
 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);
 }
예제 #10
0
        public override void Remove(T item, bool saveImmediately = true)
        {
            base.Remove(item, saveImmediately);

            WidgetBasePartService.Remove(item.ToWidgetBasePart());
        }