Пример #1
0
        /// <summary>
        /// Delete entities by bundle
        /// </summary>
        /// <param name="entities">all entities to delete</param>
        /// <param name="bundleSize">bundle size of each entities deleted each delete request</param>
        /// <param name="observer">observer to report progression</param>
        public void DeleteByBundle(List <TIEntity> entities, int bundleSize, IOrmObserver observer)
        {
            if (entities == null || !entities.Any())
            {
                return;
            }

            for (var i = 0; i < entities.Count; i += bundleSize)
            {
                var progress = Convert.ToInt32((double)i / entities.Count * 100);
                observer.ReportProgess(progress);
                var bundleToDelete = entities.Skip(i).Take(bundleSize).ToList();
                Delete(bundleToDelete);
            }
            observer.ReportProgess(100);
        }
Пример #2
0
 public void DeleteByBundle(List <TI> entities, int bundleSize, IOrmObserver observer)
 {
     throw new NotImplementedException();
 }
Пример #3
0
 public void DeleteByBundle(List <IGameStep> entities, int bundleSize, IOrmObserver observer)
 {
     throw new System.NotImplementedException();
 }