public async Task <ResultEntity> DeleteByIdAsync(int id, int userId) { var result = await _departmentManager.DeleteAsync(id, userId); if (result.Success) { await _unitOfWork.CommitAsync(); } return(result); }