dotnetcore / FreeSql

🦄 .NET aot orm, C# orm, VB.NET orm, Mysql orm, Postgresql orm, SqlServer orm, Oracle orm, Sqlite orm, Firebird orm, 达梦 orm, 人大金仓 orm, 神通 orm, 翰高 orm, 南大通用 orm, 虚谷 orm, 国产 orm, Clickhouse orm, DuckDB orm, TDengine orm, QuestDB orm, MsAccess orm.
https://dotnetcore.github.io/FreeSql/
MIT License
4.11k stars 858 forks source link

在泰语环境中,ExecuteInsertedAsync 翻译Sql Server语句出错 #1910

Open KelvinTse2017 opened 2 hours ago

KelvinTse2017 commented 2 hours ago

问题描述及重现代码:

微信图片_20241101170438 微信图片_20241101170632
        Thread.CurrentThread.CurrentCulture = new CultureInfo("th-TH");
        var Datas = await Svc.Fsql.Insert(Adds)
             .WithTransaction(Tran)
             .ExecuteInsertedAsync();

数据库版本

sql server 2022

安装的Nuget包

FreeSql.Provider.SqlServer.dll 3.2.815

.net framework/. net core? 及具体版本

.net 6.0

sql 语句

INSERT INTO [CT_Sys_OwnerMenuPermission]([Id], [CreatedBy], [CreatedUtcTime], [OwnerType], [OwnerId], [MenuId], [MenuEventCode]) V OUTPUT INSERTED.[Id] as [Id], INSERTED.[CreatedBy] as [CreatedBy], INSERTED.[CreatedUtcTime] as [CreatedUtcTime], INSERTED.[OwnerType] as [OwnerType], INSERTED.[OwnerId] as [OwnerId], INSERTED.[MenuId] as [MenuId], INSERTED.[MenuEventCode] as [MenuEventCode]ALUES(@Id_0, @CreatedBy_0, xxx

2881099 commented 1 hour ago

具体 是什么原因?验证是 indexOf 下标不是从 0 开始 的?