mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update unit
This commit is contained in:
parent
028601ca40
commit
925158791a
@ -20,8 +20,22 @@ namespace OrmTest
|
|||||||
new UnitClob(){
|
new UnitClob(){
|
||||||
Clob=x+x+x+x+x+x+x+x}
|
Clob=x+x+x+x+x+x+x+x}
|
||||||
}).ExecuteCommand();
|
}).ExecuteCommand();
|
||||||
|
|
||||||
|
db.CodeFirst.InitTables<UnitDate>();
|
||||||
|
db.Insertable(new List<UnitDate>() {
|
||||||
|
new UnitDate(){ date=DateTime.Now,date2=DateTime.Now},
|
||||||
|
new UnitDate(){ date=DateTime.Now.AddDays(10),date2=DateTime.Now.AddDays(10)}
|
||||||
|
}).ExecuteCommand();
|
||||||
|
var list=db.Queryable<UnitDate>().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class UnitDate
|
||||||
|
{
|
||||||
|
[SugarColumn(ColumnDataType = "date")]
|
||||||
|
public DateTime date { get; set; }
|
||||||
|
[SugarColumn(ColumnDataType = "timestamp")]
|
||||||
|
public DateTime date2 { get; set; }
|
||||||
|
}
|
||||||
public class UnitClob
|
public class UnitClob
|
||||||
{
|
{
|
||||||
[SugarColumn(IsPrimaryKey =true)]
|
[SugarColumn(IsPrimaryKey =true)]
|
||||||
|
Loading…
Reference in New Issue
Block a user