- 修复 Pgsql 批量更新使用 NoneParameter 后日期类型的语法 bug;

This commit is contained in:
28810
2019-08-23 18:17:17 +08:00
parent 858e3d3dbb
commit 8e33d80b5a
7 changed files with 52 additions and 1 deletions

View File

@ -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()