mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
- 修复 CodeFirst + AsTable + 自动迁移,导致索性名重复的问题 #366;
This commit is contained in:
@ -9,6 +9,7 @@ using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FreeSql.Internal.CommonProvider
|
||||
@ -124,5 +125,7 @@ namespace FreeSql.Internal.CommonProvider
|
||||
}
|
||||
|
||||
public virtual int ExecuteDDLStatements(string ddl) => _orm.Ado.ExecuteNonQuery(CommandType.Text, ddl);
|
||||
|
||||
public static string ReplaceIndexName(string indexName, string tbname) => string.IsNullOrEmpty(indexName) ? indexName : Regex.Replace(indexName, @"\{\s*TableName\s*\}", tbname, RegexOptions.IgnoreCase);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user