mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 增加 DateTime 扩展方法 Between 和 BetweenEnd 自定义表达式;
- 修复 Dto 映射,在二级即 Dto 属性上又 new Dto 的时候,错误的又重复映射了全部字段;
This commit is contained in:
@ -219,6 +219,12 @@ namespace FreeSql.Tests
|
||||
[Fact]
|
||||
public void Test02()
|
||||
{
|
||||
var start = DateTime.Now.Date;
|
||||
var end = DateTime.Now.AddDays(1).Date.AddMilliseconds(-1);
|
||||
var textbetween = g.sqlite.Select<TestIgnoreDefaultValue>()
|
||||
.Where(a => a.ct1.Between(start, end))
|
||||
.ToList();
|
||||
|
||||
g.mysql.GlobalFilter.Apply<gf_t1>("gft1", a => a.rowstate > -1)
|
||||
.Apply<gf_t2>("gft2", a => a.rowstate > -2)
|
||||
.Apply<gf_t3>("gft3", a => a.rowstate > -3);
|
||||
|
Reference in New Issue
Block a user