Pergunta

If I create my code with model first, the mapper creates the Data as I expected. But when I save some new data to the Database the primary key for all data is 0. The Entity Framework doesn't increment the Index. What is wrong? I'm using Firebird2.5 and the newest .net-Provider.

Foi útil?

Solução

Firebird has no Autoincrement for the primary keys. Look in the Properties of the created classes there is a property which handles the key generation. This is the StoreGeneratedPattern Property and it must set to Identity.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top