Add storegeneratedpattern property to your identity in EF set it to true,
and call Table1.SaveChanges(False). It worked for me
Thanks!
Muthu Annamalai
From: Rick [mailto:rick__...@hotmail.com]
Sent: Wednesday, February 17, 2010 12:59 PM
To: firebird-net-provider
Subject: [Firebird-net-provider] How to work identity columns within EF
Hello,
I would like to see an example or to see code how to work with Identity
columns with the EF. I am working with a Windows Forms app embedded.
Lets say I have Table1 and Field1 (I have tried renaming it to simply ID) as
an bigint... pri key - auto inc; which has a trigger, generator, and sp on
that field... along with the description of #PK_GEN# for that field.
Field2 is a varchar 35 etc.
I can save only one *single* row... if I add more than one row I receive an
error when I call Table1.SaveChanges():
"Violation of PRIMARY or UNIQUE KEY constraint..."
What am I missing?
Thanks
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4875 (20100217) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider