Exemplo n.º 1
0
        /// <summary>
        /// 删除模块
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task Delete(long id)
        {
            MustNotRoot(id);

            var module = await Get(id);

            var childs = await _moduleRep.GetListAsync(new ModuleQuery()
            {
                ParentId = module.Id
            });

            H_AssertEx.That(childs != null && childs.Count > 0, "存在子节点无法删除");

            await _moduleRep.DeleteAsync(module);
        }
Exemplo n.º 2
0
 public async Task <int> DeleteFormAsync(string keyValue)
 {
     return(await moduleRepository.DeleteAsync(c => c.moduleGuid == keyValue));
 }
Exemplo n.º 3
0
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _moduRepo.DeleteAsync(id);

            return(Ok(result));
        }
Exemplo n.º 4
0
 public async Task <bool> DeleteAsync(string keyValue, string dataBaseName = null)
 {
     return(await moduleRepository.DeleteAsync(keyValue, dataBaseName));
 }