mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add demo
This commit is contained in:
parent
b214d01db9
commit
ec40ad477d
@ -45,9 +45,21 @@ namespace OrmTest
|
|||||||
|
|
||||||
}).ExecuteCommand();
|
}).ExecuteCommand();
|
||||||
var list5=db.Queryable<CodeFirstArray>().ToList();
|
var list5=db.Queryable<CodeFirstArray>().ToList();
|
||||||
|
db.CodeFirst.InitTables<CodeFirstArraryBigInt>();
|
||||||
|
db.Updateable<CodeFirstArraryBigInt>()
|
||||||
|
.SetColumns(it => it.longs == new long[] { 1, 2 })
|
||||||
|
.Where(it=>it.id==1)
|
||||||
|
.ExecuteCommand();
|
||||||
Console.WriteLine("#### CodeFirst end ####");
|
Console.WriteLine("#### CodeFirst end ####");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public class CodeFirstArraryBigInt
|
||||||
|
{
|
||||||
|
[SugarColumn(IsPrimaryKey =true)]
|
||||||
|
public int id { get; set; }
|
||||||
|
[SugarColumn(IsArray =true,ColumnDataType ="int8 []")]
|
||||||
|
public long[] longs { get; set; }
|
||||||
|
}
|
||||||
public class CodeFirstArray
|
public class CodeFirstArray
|
||||||
{
|
{
|
||||||
[SugarColumn(IsArray =true,ColumnDataType = "real[]")]
|
[SugarColumn(IsArray =true,ColumnDataType = "real[]")]
|
||||||
|
Loading…
Reference in New Issue
Block a user