mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add demo
This commit is contained in:
parent
2ff0ab993d
commit
91cd05bd8e
@ -15,7 +15,7 @@ namespace OrmTest
|
||||
/// Account have permission to create database
|
||||
/// 用有建库权限的数据库账号
|
||||
/// </summary>
|
||||
public static string ConnectionString = "Server=116.242.92.57:5511;User Id=S;PWD=S0718;DATABASE=DAMENG";
|
||||
public static string ConnectionString = "Server=153.101.199.83:5236;User Id=SYSDBA;PWD=QwerasdABC;DATABASE=DAMENG";
|
||||
/// <summary>
|
||||
/// Account have permission to create database
|
||||
/// 用有建库权限的数据库账号
|
||||
|
@ -37,6 +37,8 @@ namespace OrmTest
|
||||
var list = db.Queryable<CodeFirstTable1>().ToList();
|
||||
db.CodeFirst.InitTables<CodeFirstLong>();
|
||||
var tableInfo=db.DbMaintenance.GetColumnInfosByTableName("CodeFirstLong", false);
|
||||
db.CodeFirst.InitTables<CodeFirstadfafa>();
|
||||
db.Insertable(new CodeFirstadfafa() { index = "a" }).ExecuteCommand();
|
||||
db.CurrentConnectionConfig.MoreSettings = new ConnMoreSettings()
|
||||
{
|
||||
IsAutoToUpper = false
|
||||
@ -55,6 +57,10 @@ namespace OrmTest
|
||||
Console.WriteLine("#### CodeFirst end ####");
|
||||
}
|
||||
}
|
||||
public class CodeFirstadfafa
|
||||
{
|
||||
public string index { get; set; }
|
||||
}
|
||||
public class CodeFirstNoUpper
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey =true)]
|
||||
|
Loading…
Reference in New Issue
Block a user