- 修复 聚合根仓储 InsertOrUpdate 重复插入的 bug;

This commit is contained in:
2881099 2022-11-01 22:01:20 +08:00
parent 95ceb0245b
commit 02b16ba8bd
3 changed files with 8 additions and 6 deletions

View File

@ -165,7 +165,7 @@ namespace FreeSql
if (flagExists == true)
{
var affrows = await UpdateAsync(entity, cancellationToken);
if (affrows > 0) return entity;
return entity;
}
if (table.Primarys.Where(a => a.Attribute.IsIdentity).Count() == table.Primarys.Length)
{

View File

@ -218,7 +218,7 @@ namespace FreeSql
if (flagExists == true)
{
var affrows = Update(entity);
if (affrows > 0) return entity;
return entity;
}
if (table.Primarys.Where(a => a.Attribute.IsIdentity).Count() == table.Primarys.Length)
{

View File

@ -18,21 +18,23 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
<Version>1.0.1</Version>
<Version>1.0.2</Version>
</PropertyGroup>
<ItemGroup>
<None Include="../../logo.png" Pack="true" PackagePath="\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="FreeSql.DbContext" Version="3.2.682" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<DocumentationFile>FreeSql.Extensions.AggregateRoot.xml</DocumentationFile>
<WarningLevel>3</WarningLevel>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\FreeSql.DbContext\FreeSql.DbContext.csproj" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net40'">
<DefineConstants>net40</DefineConstants>