Update Demo

This commit is contained in:
sunkaixuan
2023-09-07 16:47:44 +08:00
parent 4efd60a536
commit f37973ebc6
3 changed files with 157 additions and 11 deletions

View File

@@ -0,0 +1,46 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Text;
namespace OrmTest
{
/// <summary>
/// 纳秒
/// </summary>
[SugarTable("MyTable02")]
public class MyTable02_NS
{
[SugarColumn(IsPrimaryKey = true,SqlParameterDbType =typeof(DateTime19))]
public DateTime ts { get; set; }
public float current { get; set; }
public bool isdelete { get; set; }
public string name { get; set; }
public int voltage { get; set; }
public float phase { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public string location { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public int groupId { get; set; }
}
/// <summary>
/// 微秒
/// </summary>
[SugarTable("MyTable02")]
public class MyTable02_US
{
[SugarColumn(IsPrimaryKey = true, SqlParameterDbType = typeof(DateTime16))]
public DateTime ts { get; set; }
public float current { get; set; }
public bool isdelete { get; set; }
public string name { get; set; }
public int voltage { get; set; }
public float phase { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public string location { get; set; }
[SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)]
public int groupId { get; set; }
}
}