mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 13:34:32 +08:00
Add demo
This commit is contained in:
parent
020d2d1c32
commit
57d1aa665b
@ -33,6 +33,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
Unityadfasasdfa.Init();
|
||||||
Unitsdfaafa.Init();
|
Unitsdfaafa.Init();
|
||||||
Unitadfayyadfa.Init();
|
Unitadfayyadfa.Init();
|
||||||
Unitsdfa1231.Init();
|
Unitsdfa1231.Init();
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OrmTest
|
||||||
|
{
|
||||||
|
internal class Unityadfasasdfa
|
||||||
|
{
|
||||||
|
public static void Init()
|
||||||
|
{
|
||||||
|
var db = NewUnitTest.Db;
|
||||||
|
db.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings()
|
||||||
|
{
|
||||||
|
IsCorrectErrorSqlParameterName = true
|
||||||
|
};
|
||||||
|
try
|
||||||
|
{
|
||||||
|
db.Ado.ExecuteCommand("CREATE TABLE [unitadfaaaafa2](\r\n[打印费(折扣等)] varchar(255) NOT NULL,id varchar(50) )");
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
db.Updateable<Unitadfa121>()
|
||||||
|
.SetColumns(it =>it.a==it.a )
|
||||||
|
.Where(it=>it.id=="a")
|
||||||
|
.ExecuteCommand();
|
||||||
|
Console.WriteLine("Start");
|
||||||
|
}
|
||||||
|
[SugarTable("unitadfaaaafa2")]
|
||||||
|
public class Unitadfa121
|
||||||
|
{
|
||||||
|
[SqlSugar.SugarColumn(ColumnName ="打印费(折扣等)")]
|
||||||
|
public string a { get; set; }
|
||||||
|
[SqlSugar.SugarColumn(IsPrimaryKey =true)]
|
||||||
|
public string id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user