mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-20 12:58:15 +08:00
v0.1.5
- 增加 IsSyncStructureToUpper 参数,以便适应 Oracle 大小写使用习惯; - FreeSql.Repository 增加 GuidRepository 类,适用 Insert 方法无须返回插入的数据; - FreeSql.Repository 增加 IFreeSql 扩展方法 GetRepository、GetGuidRepository;
This commit is contained in:
@ -41,6 +41,10 @@ namespace FreeSql.Internal {
|
||||
trytb.DbName = trytb.DbName.ToLower();
|
||||
trytb.DbOldName = trytb.DbOldName?.ToLower();
|
||||
}
|
||||
if (common.CodeFirst.IsSyncStructureToUpper) {
|
||||
trytb.DbName = trytb.DbName.ToUpper();
|
||||
trytb.DbOldName = trytb.DbOldName?.ToUpper();
|
||||
}
|
||||
trytb.SelectFilter = tbattr?.SelectFilter;
|
||||
var propsLazy = new List<(PropertyInfo, bool, bool)>();
|
||||
foreach (var p in trytb.Properties.Values) {
|
||||
@ -73,6 +77,7 @@ namespace FreeSql.Internal {
|
||||
if (colattr.DbType?.Contains("NOT NULL") == true) colattr.IsNullable = false;
|
||||
if (string.IsNullOrEmpty(colattr.Name)) colattr.Name = p.Name;
|
||||
if (common.CodeFirst.IsSyncStructureToLower) colattr.Name = colattr.Name.ToLower();
|
||||
if (common.CodeFirst.IsSyncStructureToUpper) colattr.Name = colattr.Name.ToUpper();
|
||||
|
||||
if ((colattr.IsNullable != true || colattr.IsIdentity == true || colattr.IsPrimary == true) && colattr.DbType.Contains("NOT NULL") == false) {
|
||||
colattr.IsNullable = false;
|
||||
|
Reference in New Issue
Block a user