mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update Code First
This commit is contained in:
parent
75f8c547db
commit
8239dc91ac
@ -21,6 +21,17 @@ namespace OrmTest
|
||||
Console.WriteLine(s);
|
||||
};
|
||||
Db.CodeFirst.InitTables<UnitCodeFirstpks3>();
|
||||
Db.CodeFirst.InitTables<UnitCodeFirstpks32>();
|
||||
}
|
||||
|
||||
[SqlSugar.SugarTable("[dbo].[UnitCodeFirstpks3aaa122]")]
|
||||
public class UnitCodeFirstpks32
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name2 { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
[SqlSugar.SugarTable("UnitCodeFirstpks31","备注" )]
|
||||
public class UnitCodeFirstpks3
|
||||
|
@ -392,6 +392,12 @@ namespace SqlSugar
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override List<DbColumnInfo> GetColumnInfosByTableName(string tableName, bool isCache = true)
|
||||
{
|
||||
tableName = SqlBuilder.GetNoTranslationColumnName(tableName);
|
||||
var result= base.GetColumnInfosByTableName(tableName, isCache);
|
||||
return result;
|
||||
}
|
||||
public override bool RenameColumn(string tableName, string oldColumnName, string newColumnName)
|
||||
{
|
||||
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
||||
|
Loading…
Reference in New Issue
Block a user