mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 18:48:09 +08:00
Update Oracle CodeFirst
This commit is contained in:
@@ -7,6 +7,12 @@ namespace SqlSugar
|
||||
{
|
||||
public class OracleCodeFirst : CodeFirstProvider
|
||||
{
|
||||
public OracleCodeFirst() {
|
||||
if (DefultLength == 0)
|
||||
DefultLength = 40;
|
||||
}
|
||||
protected override int DefultLength { get; set; }
|
||||
|
||||
protected override void GetDbType(EntityColumnInfo item, Type propertyType, DbColumnInfo result)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(item.DataType))
|
||||
@@ -29,5 +35,11 @@ namespace SqlSugar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void KeyAction(EntityColumnInfo item, DbColumnInfo dbColumn, out bool pkDiff, out bool idEntityDiff)
|
||||
{
|
||||
pkDiff = item.IsPrimarykey != dbColumn.IsPrimarykey;
|
||||
idEntityDiff = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user