Skip to content

Commit 3812a17

Browse files
2881028810
authored andcommitted
- 修复 Firebird Embedded 2.5 不支持 boolean 的 bug;
1 parent b91fe2c commit 3812a17

File tree

2 files changed

+194
-160
lines changed

2 files changed

+194
-160
lines changed

FreeSql/FreeSql.xml

Lines changed: 187 additions & 160 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Providers/FreeSql.Provider.Firebird/FirebirdProvider.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ public FirebirdProvider(string masterConnectionString, string[] slaveConnectionS
4141

4242
this.DbFirst = new FirebirdDbFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);
4343
this.CodeFirst = new FirebirdCodeFirst(this, this.InternalCommonUtils, this.InternalCommonExpression);
44+
45+
if ((this.Ado as FirebirdAdo).IsFirebird2_5)
46+
this.Aop.ConfigEntityProperty += (_, e) =>
47+
{
48+
if (e.Property.PropertyType.NullableTypeOrThis() == typeof(bool))
49+
e.ModifyResult.MapType = typeof(short);
50+
};
4451
}
4552

4653
internal CommonUtils InternalCommonUtils { get; }

0 commit comments

Comments
 (0)