Esempio n. 1
0
 public override void Remove(T item)
 {
     WidgetBasePartService.Remove(item.ID);
 }
        public override T GetSingle(Expression <Func <T, bool> > filter)
        {
            var widgetBase = WidgetBasePartService.GetSingle(Expression.Lambda <Func <WidgetBasePart, bool> >(filter.Body, filter.Parameters));

            return(widgetBase.CopyTo(JsonConvert.DeserializeObject <T>(widgetBase.ExtendData ?? "{}")) as T);
        }
Esempio n. 3
0
 public override void Remove(Expression <Func <T, bool> > filter)
 {
     WidgetBasePartService.Remove(Expression.Lambda <Func <WidgetBasePart, bool> >(filter.Body, filter.Parameters));
 }
Esempio n. 4
0
 public override void RemoveRange(params T[] items)
 {
     WidgetBasePartService.RemoveRange(items.Select(m => m.ToWidgetBasePart()).ToArray());
 }
        public override T Get(params object[] primaryKeys)
        {
            var item = WidgetBasePartService.Get(primaryKeys);

            return(item.CopyTo(JsonConvert.DeserializeObject <T>(item.ExtendData ?? "{}")) as T);
        }
Esempio n. 6
0
 public override void Update(T item, bool saveImmediately = true)
 {
     item.ExtendData = JsonConvert.SerializeObject(item);
     WidgetBasePartService.Update(item.ToWidgetBasePart(), saveImmediately);
 }
Esempio n. 7
0
 public override void Remove(T item, bool saveImmediately = true)
 {
     WidgetBasePartService.Remove(item.ID);
 }
Esempio n. 8
0
 public override void Add(T item)
 {
     item.ID         = Guid.NewGuid().ToString("N");
     item.ExtendData = JsonConvert.SerializeObject(item);
     WidgetBasePartService.Add(item.ToWidgetBasePart());
 }
Esempio n. 9
0
        public override ServiceResult <T> UpdateRange(params T[] items)
        {
            WidgetBasePartService.UpdateRange(items.Select(m => m.ToWidgetBasePart()).ToArray());

            return(base.UpdateRange(items));
        }
Esempio n. 10
0
        public override ServiceResult <T> Update(T item, bool saveImmediately = true)
        {
            WidgetBasePartService.Update(item.ToWidgetBasePart());

            return(base.Update(item, saveImmediately));
        }
Esempio n. 11
0
        public override void Remove(T item, bool saveImmediately = true)
        {
            base.Remove(item, saveImmediately);

            WidgetBasePartService.Remove(item.ToWidgetBasePart());
        }
Esempio n. 12
0
        public override void Update(T item, bool saveImmediately = true)
        {
            WidgetBasePartService.Update(item.ToWidgetBasePart());

            base.Update(item, saveImmediately);
        }