mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-22 20:13:41 +08:00
Add unit test
This commit is contained in:
@@ -63,6 +63,22 @@ namespace OrmTest
|
|||||||
};
|
};
|
||||||
db.QueryFilter.AddTableFilter<LogicTest>(it => it.isdeleted == true);
|
db.QueryFilter.AddTableFilter<LogicTest>(it => it.isdeleted == true);
|
||||||
db.Deleteable<LogicTest>().Where(it => it.Id == 1).IsLogic().ExecuteCommand();
|
db.Deleteable<LogicTest>().Where(it => it.Id == 1).IsLogic().ExecuteCommand();
|
||||||
|
db.CodeFirst.InitTables<UnitTesdfa>();
|
||||||
|
db.Updateable<UnitTesdfa>()
|
||||||
|
.SetColumns(it => new UnitTesdfa
|
||||||
|
{
|
||||||
|
Name="aa"
|
||||||
|
})
|
||||||
|
.Where(it => it.Id == 1)
|
||||||
|
.ExecuteCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UnitTesdfa
|
||||||
|
{
|
||||||
|
[SugarColumn(ColumnName = "iiid")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
[SugarColumn(ColumnName = "nameee")]
|
||||||
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user