mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 Pgsql 批量更新使用 NoneParameter 后日期类型的语法 bug;
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
using FreeSql.DataAnnotations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Xunit;
|
||||
|
||||
namespace FreeSql.Tests.MySqlConnector
|
||||
@ -180,7 +181,14 @@ namespace FreeSql.Tests.MySqlConnector
|
||||
[Fact]
|
||||
public void ExecuteAffrows()
|
||||
{
|
||||
var items = new List<Topic>();
|
||||
for (var a = 0; a < 10; a++) items.Add(new Topic { Id = a + 1, Title = $"newtitle{a}", Clicks = a * 100 });
|
||||
|
||||
var time = DateTime.Now;
|
||||
var items222 = g.mysql.Select<Topic>().Where(a => a.CreateTime > time).Limit(10).ToList();
|
||||
|
||||
update.SetSource(items.First()).NoneParameter().ExecuteAffrows();
|
||||
update.SetSource(items).NoneParameter().ExecuteAffrows();
|
||||
}
|
||||
[Fact]
|
||||
public void ExecuteUpdated()
|
||||
|
Reference in New Issue
Block a user