public IHttpActionResult Put(DeleteAllPositionModel model)
        {
            var term = manager.GetById(model.id);
            
            foreach(var position in term.TermPositions.ToList())
            {
                positionManager.RemoveEntity(position);
            }

            positionManager.SaveChanges();

            return Ok(new { Result = "Ok" });
        }
        public IHttpActionResult Put(DeleteAllPositionModel model)
        {
            var term = manager.GetById(model.id);

            foreach (var position in term.TermPositions.ToList())
            {
                positionManager.RemoveEntity(position);
            }

            positionManager.SaveChanges();

            return(Ok(new { Result = "Ok" }));
        }
        public IHttpActionResult Put(DeleteAllPositionModel model)
        {
            var order = manager.GetById(model.id);

            foreach (var position in order.Positions.Where(o => (!model.parentId.HasValue || (o.ParentId.HasValue && o.ParentId == model.parentId.Value)) &&
                                                           o.IsMaterialPosition == model.isMaterialPosition && !o.DeleteDate.HasValue).ToList())
            {
                positionManager.RemoveEntity(position);
            }

            positionManager.SaveChanges();

            return(Ok(new { Result = "Ok" }));
        }
        public IHttpActionResult Put(DeleteAllPositionModel model)
        {
            var order = manager.GetById(model.id);
            
            foreach(var position in order.Positions.Where(o => (!model.parentId.HasValue || (o.ParentId.HasValue && o.ParentId == model.parentId.Value)) &&
                o.IsMaterialPosition == model.isMaterialPosition && !o.DeleteDate.HasValue).ToList())
            {
                positionManager.RemoveEntity(position);
            }

            positionManager.SaveChanges();

            return Ok(new { Result = "Ok" });
        }