- 修复 内部 decimal 默认值在 core 3.1+ 报错的问题;

This commit is contained in:
28810
2020-10-12 12:53:16 +08:00
parent efa71e8cba
commit e777e7e86f
4 changed files with 41 additions and 2 deletions

View File

@ -69,6 +69,24 @@ namespace base_entity
public Sys_reg_user RegUser { get; set; }
}
public class tttorder
{
[Column(IsPrimary = true)]
public long Id { get; set; }
public string Title { get; set; }
public int Quantity { get; set; }
public decimal Price { get; set; }
public tttorder(string title, int quantity, decimal price)
{
Id = DateTime.Now.Ticks;
Title = title;
Quantity = quantity;
Price = price;
}
}
static void Main(string[] args)
{
#region IFreeSql
@ -107,6 +125,11 @@ namespace base_entity
BaseEntity.Initialization(fsql, () => _asyncUow.Value);
#endregion
fsql.Insert(new tttorder("xx1", 1, 10)).ExecuteAffrows();
fsql.Insert(new tttorder("xx2", 2, 20)).ExecuteAffrows();
var tttorders = fsql.Select<tttorder>().Limit(2).ToList();
var tsql1 = fsql.Select<Sys_reg_user>()
.Include(a => a.Owner)
.Where(a => a.UnionId == "xxx")