mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Update demo
This commit is contained in:
parent
15f6717508
commit
fd078d781c
@ -28,8 +28,8 @@ namespace TDengineTest
|
|||||||
db.CodeFirst.InitTables<TDHistoryValue>();
|
db.CodeFirst.InitTables<TDHistoryValue>();
|
||||||
|
|
||||||
//更多建表用例
|
//更多建表用例
|
||||||
db.CodeFirst.InitTables<CodeFirst03>();
|
db.CodeFirst.InitTables<CodeFirst0311>();
|
||||||
db.Insertable(new CodeFirst03()
|
db.Insertable(new CodeFirst0311()
|
||||||
{
|
{
|
||||||
Ts = DateTime.Now,
|
Ts = DateTime.Now,
|
||||||
Boolean = true,
|
Boolean = true,
|
||||||
@ -49,8 +49,8 @@ namespace TDengineTest
|
|||||||
UInt32=332,
|
UInt32=332,
|
||||||
UInt64=664
|
UInt64=664
|
||||||
}).ExecuteCommand();
|
}).ExecuteCommand();
|
||||||
var dt = db.Ado.GetDataTable("select * from CodeFirst03 ");
|
var dt = db.Ado.GetDataTable("select * from CodeFirst0311 ");
|
||||||
var list3 = db.Queryable<CodeFirst03>().ToList();
|
var list3 = db.Queryable<CodeFirst0311>().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void CodeFirst5(SqlSugarClient db)
|
private static void CodeFirst5(SqlSugarClient db)
|
||||||
|
@ -7,31 +7,23 @@ using System.Text;
|
|||||||
namespace TDengineTest
|
namespace TDengineTest
|
||||||
{
|
{
|
||||||
|
|
||||||
public class CodeFirst03 : STable
|
public class CodeFirst0311 : STable
|
||||||
{
|
{
|
||||||
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
[SqlSugar.SugarColumn(IsPrimaryKey = true)]
|
||||||
public DateTime Ts { get; set; }
|
public DateTime Ts { get; set; }
|
||||||
public bool Boolean { get; set; }
|
public bool Boolean { get; set; }
|
||||||
[SqlSugar.SugarColumn(SqlParameterDbType = typeof(CommonPropertyConvert))]
|
|
||||||
public byte Byte { get; set; }
|
public byte Byte { get; set; }
|
||||||
[SqlSugar.SugarColumn(SqlParameterDbType =typeof(CommonPropertyConvert))]
|
|
||||||
public sbyte SByte { get; set; }
|
public sbyte SByte { get; set; }
|
||||||
public char Char { get; set; }
|
public char Char { get; set; }
|
||||||
public decimal Decimal { get; set; }
|
public decimal Decimal { get; set; }
|
||||||
[SqlSugar.SugarColumn(Length = 18, DecimalDigits = 2)]
|
|
||||||
public decimal Decimal2 { get; set; }
|
public decimal Decimal2 { get; set; }
|
||||||
[SqlSugar.SugarColumn(Length = 18, DecimalDigits = 2)]
|
|
||||||
public double Double { get; set; }
|
public double Double { get; set; }
|
||||||
[SqlSugar.SugarColumn(SqlParameterDbType = typeof(CommonPropertyConvert))]
|
|
||||||
public float Float { get; set; }
|
public float Float { get; set; }
|
||||||
public int Int32 { get; set; }
|
public int Int32 { get; set; }
|
||||||
[SqlSugar.SugarColumn(SqlParameterDbType = typeof(CommonPropertyConvert))]
|
|
||||||
public uint UInt32 { get; set; }
|
public uint UInt32 { get; set; }
|
||||||
public long Int64 { get; set; }
|
public long Int64 { get; set; }
|
||||||
[SqlSugar.SugarColumn(SqlParameterDbType = typeof(CommonPropertyConvert))]
|
|
||||||
public ulong UInt64 { get; set; }
|
public ulong UInt64 { get; set; }
|
||||||
public short Int16 { get; set; }
|
public short Int16 { get; set; }
|
||||||
[SqlSugar.SugarColumn(SqlParameterDbType = typeof(CommonPropertyConvert))]
|
|
||||||
public ushort UInt16 { get; set; }
|
public ushort UInt16 { get; set; }
|
||||||
public string String { get; set; }
|
public string String { get; set; }
|
||||||
[SqlSugar.SugarColumn(Length = 100)]
|
[SqlSugar.SugarColumn(Length = 100)]
|
||||||
|
Loading…
Reference in New Issue
Block a user