Page 1 of 1

dotConnect for Oracle, EF6 and ID column

Posted: Thu 21 May 2015 16:33
by yammi900
Dear all,

I tried to follow the instructions in your article http://blog.devart.com/set-identity-and ... ggers.html in order to set the ID-column with a value from a sequence, however then
<Property Name="ID" Type="int" Nullable="false" StoreGeneratedPattern="Identity" devart:DefaultValue="MY_SEQUENCE.NEXTVAL" />
in my .edmx file (XML SSDL) causes Visual Studio 2013 to throw 2 errors:
  • 'devart' is not a declared prefix
    Namespace prefix 'devart' was not defined
Did I miss something? What can I do?

Regards,

Yammi900

Re: dotConnect for Oracle, EF6 and ID column

Posted: Fri 22 May 2015 06:42
by yammi900
Yeep,

by comparing with the Entity Desinger generated code I found the solution, which the article did not mention:

I had to declare 'devart'

Code: Select all

xmlns:devart="http://devart.com/schemas/edml/StorageSchemaExtensions/1.0"
in the 'Schema' tag of the SSDL content

Code: Select all

<Schema Namespace="MyModel.Store" 
            Provider="Devart.Data.Oracle" 
            ProviderManifestToken="Oracle, 11.2.0.1" 
            Alias="Self" 
            xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" 
            xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" 
            xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl"
            xmlns:devart="http://devart.com/schemas/edml/StorageSchemaExtensions/1.0">
However, I had to close an re-open the .edmx file in order to make the errors go away. But now it works like a charm.

Cheers,

Yammi900