From b07dcffa4a64e6a73ca0db5846b5b9660a03dde7 Mon Sep 17 00:00:00 2001 From: tanglong Date: Wed, 1 Jul 2026 15:26:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- YD_YiLu/Controllers/DeviceSyncController.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/YD_YiLu/Controllers/DeviceSyncController.cs b/YD_YiLu/Controllers/DeviceSyncController.cs index 2b1bddc..e99c023 100644 --- a/YD_YiLu/Controllers/DeviceSyncController.cs +++ b/YD_YiLu/Controllers/DeviceSyncController.cs @@ -166,6 +166,18 @@ namespace YD_YiLu.Api.Controllers [Route("/device/sync/grade/my_record")] public async Task MyRecord([FromBody] DeviceSyncMyRecordRequestDto dto) { + /* + * fail: Microsoft.EntityFrameworkCore.Query[10100] + An exception occurred while iterating over the results of a query for context type 'YD_YiLu.Api.Context.SmartSportsContext'. + System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.Double'. + at Microsoft.Data.SqlClient.SqlBuffer.get_Double() + at lambda_method804(Closure , QueryContext , DbDataReader , ResultContext , SingleQueryResultCoordinator ) + at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync() + System.InvalidCastException: Unable to cast object of type 'System.Int32' to type 'System.Double'. + at Microsoft.Data.SqlClient.SqlBuffer.get_Double() + at lambda_method804(Closure , QueryContext , DbDataReader , ResultContext , SingleQueryResultCoordinator ) + at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync() + */ var res = await _deviceSyncService.MyRecordAsync(dto); return res; }