/// <summary> /// 根据ID主键删除 /// </summary> /// <param name="id"></param> /// <returns></returns> public async Task <bool> Delete(string id) { int ret = _iAttachmentRepository.Count(q => q.TypeCode == id); if (ret > 0) { return(false); } try { await _iMultimediaTypeRepository.DeleteAsync(id); } catch (Exception) { return(false); } return(true); }