mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-19 10:08:19 +08:00
PgSql Update List optimize
This commit is contained in:
@@ -24,9 +24,36 @@ namespace OrmTest
|
||||
Db.CodeFirst.InitTables<UnitArray2>();
|
||||
Db.Insertable(new UnitArray2() { MenuIds = new float[] { 1, 2 } }).ExecuteCommand();
|
||||
var x=Db.Queryable<UnitArray2>().ToList();
|
||||
Db.CodeFirst.InitTables<UnitArray311>();
|
||||
Db.Insertable(new UnitArray311()
|
||||
{
|
||||
Text=new string[] {"a","a" }
|
||||
|
||||
}).ExecuteCommand();
|
||||
Db.Updateable(new List<UnitArray311> {
|
||||
new UnitArray311()
|
||||
{
|
||||
Text = new string[] { "a12", "a2" },
|
||||
Id=1
|
||||
|
||||
},
|
||||
new UnitArray311()
|
||||
{
|
||||
Text = new string[] { "a1", "a1" },
|
||||
Id=2
|
||||
|
||||
}
|
||||
}).ExecuteCommand();
|
||||
var xxx = Db.Queryable<UnitArray311>().ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public class UnitArray311
|
||||
{
|
||||
[SugarColumn(IsArray =true,ColumnDataType ="text []" )]
|
||||
public string[] Text { get; set; }
|
||||
[SugarColumn(IsPrimaryKey =true,IsIdentity =true)]
|
||||
public int Id { get; set; }
|
||||
}
|
||||
public class UnitArray2
|
||||
{
|
||||
[SugarColumn(ColumnDataType = "real []", IsArray = true)]
|
||||
|
Reference in New Issue
Block a user