mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-21 02:57:33 +08:00
Update Code First
This commit is contained in:
@@ -21,6 +21,17 @@ namespace OrmTest
|
|||||||
Console.WriteLine(s);
|
Console.WriteLine(s);
|
||||||
};
|
};
|
||||||
Db.CodeFirst.InitTables<UnitCodeFirstpks3>();
|
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","备注" )]
|
[SqlSugar.SugarTable("UnitCodeFirstpks31","备注" )]
|
||||||
public class UnitCodeFirstpks3
|
public class UnitCodeFirstpks3
|
||||||
|
@@ -392,6 +392,12 @@ namespace SqlSugar
|
|||||||
}
|
}
|
||||||
return true;
|
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)
|
public override bool RenameColumn(string tableName, string oldColumnName, string newColumnName)
|
||||||
{
|
{
|
||||||
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
tableName = this.SqlBuilder.GetTranslationTableName(tableName);
|
||||||
|
Reference in New Issue
Block a user