mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Add demo
This commit is contained in:
parent
6dd5ed29cf
commit
20ae581dfc
@ -35,9 +35,18 @@ namespace OrmTest
|
||||
db.CodeFirst.InitTables<CodeFirstByte>();
|
||||
db.Insertable(new CodeFirstByte() { array = new byte[] { 1, 2, 4, 5 } }).ExecuteCommand();
|
||||
var list4=db.Queryable<CodeFirstByte>().ToList();
|
||||
db.CodeFirst.InitTables<CodeFirstEnum>();
|
||||
db.DbMaintenance.TruncateTable<CodeFirstEnum>();
|
||||
db.Storageable(new CodeFirstEnum() { dbType = DbType.Access, Name = "a" }).ExecuteCommand();
|
||||
Console.WriteLine("#### CodeFirst end ####");
|
||||
}
|
||||
}
|
||||
public class CodeFirstEnum
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey =true)]
|
||||
public DbType dbType { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
public class CodeFirstByte
|
||||
{
|
||||
public byte[] array { get; set; }
|
||||
|
Loading…
Reference in New Issue
Block a user