SubSonic 2.1 對 Oracle 支援不佳,改用 ADO.NET EF + EFOracleProvider。Edmgen.exe 產生模型時錯誤:char、timestamp(x) 型別不支援。

檔案:EfOracleProvider/Resources/EFOracleProviderManifest.xml,定義 Oracle 型別 ↔ .NET 型別映射。
加入 char 映射:
<Type Name="char" PrimitiveTypeKind="String">
<FacetDescriptions>
<MaxLength Minimum="1" Maximum="4000" DefaultValue="4000" Constant="false" />
<Unicode DefaultValue="false" Constant="true" />
<FixedLength DefaultValue="true" Constant="true" />
</FacetDescriptions>
</Type>
同理可加入 timestamp、interval 等型別。修改後重新編譯 Provider,Edmgen 即可正常產生模型。