mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Add demo
This commit is contained in:
parent
e1a94e9d89
commit
223a974e00
@ -38,9 +38,21 @@ namespace OrmTest
|
||||
db.CodeFirst.InitTables<CodeFirstEnum>();
|
||||
db.DbMaintenance.TruncateTable<CodeFirstEnum>();
|
||||
db.Storageable(new CodeFirstEnum() { dbType = DbType.Access, Name = "a" }).ExecuteCommand();
|
||||
db.CodeFirst.InitTables<CodeFirstArray>();
|
||||
db.Insertable(new List<CodeFirstArray>() {
|
||||
new CodeFirstArray() { floats = new float[] { 1 } },
|
||||
new CodeFirstArray() { floats = new float[] { 1 } }
|
||||
|
||||
}).ExecuteCommand();
|
||||
var list5=db.Queryable<CodeFirstArray>().ToList();
|
||||
Console.WriteLine("#### CodeFirst end ####");
|
||||
}
|
||||
}
|
||||
public class CodeFirstArray
|
||||
{
|
||||
[SugarColumn(IsArray =true,ColumnDataType = "real[]")]
|
||||
public float[] floats { get; set; }
|
||||
}
|
||||
public class CodeFirstEnum
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey =true)]
|
||||
|
Loading…
Reference in New Issue
Block a user