mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 12:28:15 +08:00
- 增加 AsTable 和 Repository 分表时的自动迁移分表功能;
- 增加 ICodeFirst.SyncStructure(Type entityType, string tableName) 指定表名来迁移实体; ```csharp fsql.CodeFirst.SyncStructure(typeof(Log), "Log_1"); //迁移到 Log_1 表 fsql.CodeFirst.SyncStructure(typeof(Log), "Log_2"); //迁移到 Log_2 表 ```
This commit is contained in:
@ -44,10 +44,17 @@ namespace FreeSql
|
||||
/// <summary>
|
||||
/// 将实体类型集合与数据库对比,返回DDL语句
|
||||
/// </summary>
|
||||
/// <param name="entityTypes"></param>
|
||||
/// <param name="entityTypes">实体类型</param>
|
||||
/// <returns></returns>
|
||||
string GetComparisonDDLStatements(params Type[] entityTypes);
|
||||
/// <summary>
|
||||
/// 将实体类型与数据库对比,返回DDL语句(指定表名)
|
||||
/// </summary>
|
||||
/// <param name="entityType">实体类型</param>
|
||||
/// <param name="tableName">指定表名对比</param>
|
||||
/// <returns></returns>
|
||||
string GetComparisonDDLStatements(Type entityType, string tableName);
|
||||
/// <summary>
|
||||
/// 同步实体类型到数据库
|
||||
/// </summary>
|
||||
/// <typeparam name="TEntity"></typeparam>
|
||||
@ -59,6 +66,13 @@ namespace FreeSql
|
||||
/// <param name="entityTypes"></param>
|
||||
/// <returns></returns>
|
||||
bool SyncStructure(params Type[] entityTypes);
|
||||
/// <summary>
|
||||
/// 同步实体类型到数据库(指定表名)
|
||||
/// </summary>
|
||||
/// <param name="entityType">实体类型</param>
|
||||
/// <param name="tableName">指定表名对比</param>
|
||||
/// <returns></returns>
|
||||
bool SyncStructure(Type entityType, string tableName);
|
||||
|
||||
/// <summary>
|
||||
/// 根据 System.Type 获取数据库信息
|
||||
|
Reference in New Issue
Block a user