mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2026-02-26 05:32:53 +08:00
Update ClickHouse
This commit is contained in:
@@ -107,7 +107,7 @@ namespace OrmTest
|
||||
var data6 = orderDb.GetPageList(it => it.Name == "xx", p, it => it.Name, OrderByType.Asc);
|
||||
Console.Write(p.TotalCount);
|
||||
List<IConditionalModel> conModels = new List<IConditionalModel>();
|
||||
conModels.Add(new ConditionalModel() { FieldName = "id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
|
||||
conModels.Add(new ConditionalModel() { FieldName = "Id", ConditionalType = ConditionalType.Equal, FieldValue = "1", FieldValueConvertFunc=it=>Convert.ToInt32(it) });//id=1
|
||||
var data7 = orderDb.GetPageList(conModels, p, it => it.Name, OrderByType.Asc);
|
||||
orderDb.AsQueryable().Where(x => x.Id == 1).ToList();
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace OrmTest
|
||||
|
||||
var json = db.Queryable<Order>().ToJson();
|
||||
|
||||
List<int> listInt = db.Queryable<Order>().Select(it => it.Id).ToList();
|
||||
List<long> listInt = db.Queryable<Order>().Select(it => it.Id).ToList();
|
||||
|
||||
var dynamic = db.Queryable<Order>().Select<dynamic>().ToList();
|
||||
|
||||
|
||||
@@ -8,7 +8,8 @@ namespace OrmTest
|
||||
{
|
||||
public class Custom
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,15 +9,15 @@ namespace OrmTest
|
||||
|
||||
public class Order
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
[SugarColumn(IsNullable = true)]
|
||||
public DateTime CreateTime { get; set; }
|
||||
[SugarColumn(IsNullable =true)]
|
||||
public int CustomId { get; set; }
|
||||
public long CustomId { get; set; }
|
||||
[SugarColumn(IsIgnore = true)]
|
||||
public List<OrderItem> Items { get; set; }
|
||||
}
|
||||
|
||||
@@ -8,9 +8,9 @@ namespace OrmTest
|
||||
[SqlSugar.SugarTable("OrderDetail")]
|
||||
public class OrderItem
|
||||
{
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey =true, IsIdentity =true)]
|
||||
public int ItemId { get; set; }
|
||||
public int OrderId { get; set; }
|
||||
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
|
||||
public long ItemId { get; set; }
|
||||
public long OrderId { get; set; }
|
||||
public decimal? Price { get; set; }
|
||||
[SqlSugar.SugarColumn(IsNullable = true)]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user