Пример #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);
        }
Пример #2
0
 public async Task <int> DeleteFormAsync(string keyValue)
 {
     return(await moduleRepository.DeleteAsync(c => c.moduleGuid == keyValue));
 }
Пример #3
0
        public async Task <IActionResult> Delete(int id)
        {
            var result = await _moduRepo.DeleteAsync(id);

            return(Ok(result));
        }
Пример #4
0
 public async Task <bool> DeleteAsync(string keyValue, string dataBaseName = null)
 {
     return(await moduleRepository.DeleteAsync(keyValue, dataBaseName));
 }