Beispiel #1
0
        public List <WorkFlow> Query(Func <QueryDescriptor <WorkFlow>, QueryDescriptor <WorkFlow> > container)
        {
            QueryDescriptor <WorkFlow> q = container(QueryDescriptorBuilder.Build <WorkFlow>());
            var datas = _workFlowRepository.Query(q)?.ToList();

            WrapLocalizedLabel(datas);
            return(datas);
        }
Beispiel #2
0
        /// <summary>
        /// 级联删除
        /// </summary>
        /// <param name="parent">被删除的实体</param>
        public void CascadeDelete(params Schema.Domain.Entity[] parent)
        {
            if (parent.IsEmpty())
            {
                return;
            }
            var entityIds = parent.Select(x => x.EntityId).ToArray();
            var deleteds  = _workFlowRepository.Query(x => x.EntityId.In(entityIds));

            if (deleteds.NotEmpty())
            {
                DeleteCore(deleteds.ToArray());
            }
        }