mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 10:38:09 +08:00
Add unit test
This commit is contained in:
@@ -26,9 +26,22 @@ namespace OrmTest
|
||||
db.CodeFirst.InitTables<CodeFirstChar2>();
|
||||
db.Insertable(new CodeFirstChar2() { CharTest = '1' }).ExecuteCommand();
|
||||
var list2=db.Queryable<CodeFirstChar2>().ToList();
|
||||
db.Aop.OnLogExecuting = (s, p) => Console.WriteLine(UtilMethods.GetNativeSql(s, p));
|
||||
db.CodeFirst.InitTables<CodeFirstsaf>();
|
||||
db.CodeFirst.InitTables<CODEFIRSTSAF>();
|
||||
Console.WriteLine("#### CodeFirst end ####");
|
||||
}
|
||||
}
|
||||
public class CodeFirstsaf
|
||||
{
|
||||
[SugarColumn(DefaultValue ="")]
|
||||
public string Json { get; set; }
|
||||
}
|
||||
public class CODEFIRSTSAF
|
||||
{
|
||||
[SugarColumn(DefaultValue = "a")]
|
||||
public string Json { get; set; }
|
||||
}
|
||||
public class CodeFirstChar2
|
||||
{
|
||||
[SqlSugar.SugarColumn(ColumnDataType ="varchar(1)")]
|
||||
|
Reference in New Issue
Block a user