Skip to content

Commit 76e719c

Browse files
committed
- 修复 SqlServer DbFirst 大小写判断问题;
1 parent edf3497 commit 76e719c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Providers/FreeSql.Provider.Custom/SqlServer/CustomSqlServerDbFirst.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public List<DbTableInfo> GetTables(string[] database, string tablename, bool ign
144144
tbname = _commonUtils.SplitTableName(tablename);
145145
if (tbname?.Length == 1) tbname = new[] { olddatabase, "dbo", tbname[0] };
146146
if (tbname?.Length == 2) tbname = new[] { olddatabase, tbname[0], tbname[1] };
147-
tbname = tbname.Select(a => a.ToLower()).ToArray();
147+
if (ignoreCase) tbname = tbname.Select(a => a.ToLower()).ToArray();
148148
dbs = new[] { tbname[0] };
149149
}
150150
var tables = new List<DbTableInfo>();

Providers/FreeSql.Provider.Odbc/SqlServer/OdbcSqlServerDbFirst.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public List<DbTableInfo> GetTables(string[] database, string tablename, bool ign
147147
tbname = _commonUtils.SplitTableName(tablename);
148148
if (tbname?.Length == 1) tbname = new[] { olddatabase, "dbo", tbname[0] };
149149
if (tbname?.Length == 2) tbname = new[] { olddatabase, tbname[0], tbname[1] };
150-
tbname = tbname.Select(a => a.ToLower()).ToArray();
150+
if (ignoreCase) tbname = tbname.Select(a => a.ToLower()).ToArray();
151151
dbs = new[] { tbname[0] };
152152
}
153153
var tables = new List<DbTableInfo>();

Providers/FreeSql.Provider.SqlServer/SqlServerDbFirst.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public List<DbTableInfo> GetTables(string[] database, string tablename, bool ign
150150
tbname = _commonUtils.SplitTableName(tablename);
151151
if (tbname?.Length == 1) tbname = new[] { olddatabase, "dbo", tbname[0] };
152152
if (tbname?.Length == 2) tbname = new[] { olddatabase, tbname[0], tbname[1] };
153-
tbname = tbname.Select(a => a.ToLower()).ToArray();
153+
if (ignoreCase) tbname = tbname.Select(a => a.ToLower()).ToArray();
154154
dbs = new[] { tbname[0] };
155155
}
156156
var tables = new List<DbTableInfo>();

0 commit comments

Comments
 (0)