mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Update diff log bug
This commit is contained in:
parent
01950b556c
commit
6378850d80
@ -59,6 +59,9 @@ namespace OrmTest
|
|||||||
|
|
||||||
db.Insertable(list.Take(5).ToList()).EnableDiffLogEvent().ExecuteCommand();
|
db.Insertable(list.Take(5).ToList()).EnableDiffLogEvent().ExecuteCommand();
|
||||||
|
|
||||||
|
db.CodeFirst.InitTables<DiffLong>();
|
||||||
|
db.Insertable(new List<DiffLong>() { new DiffLong() { Id=SnowFlakeSingle.Instance.NextId(), Name="2" },new DiffLong() { Id = SnowFlakeSingle.Instance.NextId(), Name = "2" } }).EnableDiffLogEvent().ExecuteCommand();
|
||||||
|
|
||||||
db.Insertable(new Order() { CreateTime=DateTime.Now, CustomId=1, Name="a" ,Price=1 }).EnableDiffLogEvent().ExecuteCommand();
|
db.Insertable(new Order() { CreateTime=DateTime.Now, CustomId=1, Name="a" ,Price=1 }).EnableDiffLogEvent().ExecuteCommand();
|
||||||
|
|
||||||
data.Name = "changeName";
|
data.Name = "changeName";
|
||||||
|
15
Src/Asp.Net/SqlServerTest/Models/DiffLong.cs
Normal file
15
Src/Asp.Net/SqlServerTest/Models/DiffLong.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
public class DiffLong
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
|
||||||
|
public long Id { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -85,6 +85,7 @@
|
|||||||
<Compile Include="Demo\DemoN_SplitTable.cs" />
|
<Compile Include="Demo\DemoN_SplitTable.cs" />
|
||||||
<Compile Include="Models\DataDictionary.cs" />
|
<Compile Include="Models\DataDictionary.cs" />
|
||||||
<Compile Include="Models\Custom.cs" />
|
<Compile Include="Models\Custom.cs" />
|
||||||
|
<Compile Include="Models\DiffLong.cs" />
|
||||||
<Compile Include="Models\EntityMapper.cs" />
|
<Compile Include="Models\EntityMapper.cs" />
|
||||||
<Compile Include="Models\Mapper.cs" />
|
<Compile Include="Models\Mapper.cs" />
|
||||||
<Compile Include="Models\SubInsertTest.cs" />
|
<Compile Include="Models\SubInsertTest.cs" />
|
||||||
|
@ -861,6 +861,10 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
return GetDiffTableByEntity();
|
return GetDiffTableByEntity();
|
||||||
}
|
}
|
||||||
|
else if (GetIdentityKeys().IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
return GetDiffTableByEntity();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return GetDiffTableBySql(identity);
|
return GetDiffTableBySql(identity);
|
||||||
|
Loading…
Reference in New Issue
Block a user