The new ID problem while creating new entity object.

May 21, 2009 at 1:48 PM

When I was using SqlClient provider and MS SQL DataBase the primary key in all tables was auto increment.

So, when I created new entity object, it automatically got the ID (primary key).

In Oracle I use 'sequences' to generate new ID for a new line in a table, as there is no auto increment primary key.

But when I create new entity object using EF Oracle provider, the ID (primary key) = 0. EF Oracle provider does not give me new ID.

Is there any simple method to create new entity object with new ID?