Code: Select all
<Property Name="ADDRESS_ID" Type="int64" Nullable="false" devart:DefaultValue="DDD_ADDRESS_ID.NEXTVAL" StoreGeneratedPattern="Identity" />
We get back database error due to this since key value cannot be inserted as null. I have installed EntityFramework dll in the project from Nuget package which I restored in the solution for TFS build. Everything else works fine for EF6 just the storedgeneratedpattern does not work. Am I missing anything? Here is the generated SQL
Code: Select all
DECLARE
updatedRowid ROWID;
BEGIN
INSERT INTO AGTAPP.DDD_CONTACT(ROLE, FIRST_NAME, LAST_NAME, PHONE, MOBILE, FAX, EMAIL, QC_REPORT_CONTACT, LAST_UPDATED_BY)
VALUES (NULL, :p0, :p1, NULL, :p2, NULL, NULL, NULL, :p3)
RETURNING ROWID INTO updatedRowid;
OPEN :outParameter FOR SELECT DDD_CONTACT_ID, LAST_UPDATED_DATE FROM AGTAPP.DDD_CONTACT WHERE ROWID = updatedRowid;
END;
Code: Select all
// Here we configure the EF-provider, so that the default values defined in the model are used
var config = OracleEntityProviderConfig.Instance;
config.DmlOptions.InsertNullBehaviour = InsertNullBehaviour.InsertDefaultOrNull;
_context = new DDDEntities();