mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-18 20:08:15 +08:00
- 修复 内部 decimal 默认值在 core 3.1+ 报错的问题;
This commit is contained in:
@ -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")
|
||||
|
Reference in New Issue
Block a user