- 增加 IsSyncStructureToUpper 参数,以便适应 Oracle 大小写使用习惯;
- FreeSql.Repository 增加 GuidRepository 类,适用 Insert 方法无须返回插入的数据;
- FreeSql.Repository 增加 IFreeSql 扩展方法 GetRepository、GetGuidRepository;
This commit is contained in:
28810
2019-02-28 17:31:04 +08:00
parent a3720bf81e
commit f034d4194d
23 changed files with 281 additions and 195 deletions

View File

@ -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;