/// <summary> /// 转换为用户权限数据传输对象 /// </summary> /// <param name="entity">用户权限实体</param> public static UserPermissionDto ToDto(this UserPermission entity) { if (entity == null) { return(new UserPermissionDto()); } return(entity.MapTo <UserPermissionDto>()); }