user10937155 wrote:That seems unnecessarily harsh, I'm just a guy trying to help out. :(
That's about the most miserable answer I can imagine.
Code-first as a whole is not supported, and that makes sense as it involves a LOT of functionality, predominantly deriving, instantiating, and populating DB schema on the fly.
In contrast, they offer, document, and support "model first" approach which means one builds a magical EDMX file that is used to build the Oracle Schema. The mapping of bool to NUMBER(1,0) is possible here (i.e. the custom mappings in *.config*), which means the OracleEFProvider can accomplish it... and thus means it is possible programmatically. the problem is no one is helping to enlighten us, but returning "i don't know, so it must be because it can't work"
From the CSDL:
<EntityType Name="PARAMETER"> <Key> <PropertyRef Name="PARAMETER_CD" /> </Key> <Property Name="PARAMETER_CD" Type="number" Nullable="false" Precision="4" /> <Property Name="PARAMETER_ACTIVE_INDR" Type="number" Nullable="false" Precision="1" /> </EntityType>
From the C-S mapping:
<EntityType Name="PARAMETER"> <Key> <PropertyRef Name="PARAMETER_CD" /> </Key> <Property Type="Int16" Name="PARAMETER_CD" Nullable="false" /> <Property Type="Boolean" Name="PARAMETER_ACTIVE_INDR" Nullable="false" /> </EntityType>
Also worth noting that the EDMX mapper probably won't set the provider and token correctly:
<EntitySetMapping Name="PARAMETER"> <EntityTypeMapping TypeName="Model.PARAMETER"> <MappingFragment StoreEntitySet="PARAMETER"> <ScalarProperty Name="PARAMETER_ACTIVE_INDR" ColumnName="PARAMETER_ACTIVE_INDR" /> <ScalarProperty Name="PARAMETER_CD" ColumnName="PARAMETER_CD" /> </MappingFragment> </EntityTypeMapping> </EntitySetMapping>
Full version is available at http://www.hiredgoons.ca/DataImport.edmx . This is an early development one so I make no apologies for not renaming columns to something readable. ;) It does work correctly as I've had it in testing (taking data from a 170MB excel file and putting it into Oracle using the model). It was created using DB First.
<Schema Namespace="Model.Store" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="11.2" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">