This discussion is archived
5 Replies Latest reply: Jan 2, 2013 8:59 AM by Tridus Branched to a new discussion. RSS

Entity framework code first support

767414 Newbie
Currently Being Moderated
Hi,

Does the latest version of oracle data provider that works with .NET 4.5 support code first workflow ?

Thanks and regards
Venkatesh. S
  • 1. Re: Entity framework code first support
    Alex_Keh - Oracle_Product_Manager Expert
    Currently Being Moderated
    No. ODP.NET 11.2.0.3.20 does not.
  • 2. Re: Entity framework code first support
    767414 Newbie
    Currently Being Moderated
    Hi,

    Can you please let me know by when Oracle plans to support the same. This new workflow had made EF very easy and light weight to use. So please let us know by which version and date we can have the same.

    Thanks and regards
    Venkatesh. S
  • 3. Re: Entity framework code first support
    Alex_Keh - Oracle_Product_Manager Expert
    Currently Being Moderated
    Right now, we don't have a planned date. We'll announce a planned date when we have one ready.
  • 4. Re: Entity framework code first support
    982369 Newbie
    Currently Being Moderated
    Hi Alex,

    Extending the same question.

    Does ODP.net provider 11.2.0.3.0 supports Code first approach with .net framework 4.0?

    I am giving oracle support to the .Net application. It able to load the data but while retrieving it throws mapping error. I did not able to find a solution. The errors are as below.

    Schema specified is not valid. Errors:
    (16,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Guid[Nullable=False,DefaultValue=]' of member 'Id' in type 'MyNamespace.Account' is not compatible with 'OracleEFProvider.raw[Nullable=False,DefaultValue=,MaxLength=2000,FixedLength=False]' of member 'Id' in type 'CodeFirstDatabaseSchema.Account'.
    (17,12) : error 2019: Member Mapping specified is not valid. The type 'Edm.Boolean[Nullable=False,DefaultValue=]' of member 'IsUserEnteredValue' in type 'MyNamespace.Account' is not compatible with 'OracleEFProvider.number[Nullable=False,DefaultValue=,Precision=38,Scale=0]' of member 'IsUserEnteredValue' in type 'CodeFirstDatabaseSchema.Account'.

    You help will be appreciated.

    Best Regards,
    Manoj
  • 5. Re: Entity framework code first support
    Tridus Journeyer
    Currently Being Moderated
    Hi. Still not supported. That said, those errors are just invalid mappings. I don't use Guids so I don't know how to map those, but you can map a number(1,0) to a boolean property by adding this to your app.config (or web.config):
      <oracle.dataaccess.client>
        <settings>
          <add name="bool" value="edmmapping number(1,0)" />
        </settings>
      </oracle.dataaccess.client>  
    Now, that error says that it thinks the column is a number(38,0). If that's really what it is, you should change it to a number(1,0) if you're only storing a boolean value there. (If you're storing more numbers, the boolean mapping won't make sense anyway.)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points