I haven't ported to EF yet, but here is a suggestion:
  Generate all of your PKs at the client using either the same connection 
object if you can access it or a secondary one.
  Add a query to fetch the generator value for you as soon as you create a row 
that requires one.
I have been using this for all my old DataSet based projects and it seems to be 
working fine.

Regards.



________________________________
From: Muthu Annamalai <[email protected]>
To: For users and developers of the Firebird .NET providers 
<[email protected]>
Sent: Thu, 21 January, 2010 0:17:46
Subject: Re: [Firebird-net-provider] Entity Framework Foreign Key  Relation

I don't create the insert statement, it is created by Entity Framework. In
EF I have set the field as below
StoreGeneratedPattern: Identity
EntityKey: True
Name:Id
Nullable:False
Type:Int32

Thanks!
Muthu Annamalai

-----Original Message-----
From: Helen Borrie [mailto:[email protected]] 
Sent: Wednesday, January 20, 2010 6:08 PM
To: For users and developers of the Firebird .NET providers
Subject: Re: [Firebird-net-provider] Entity Framework Foreign Key Relation

At 10:48 AM 21/01/2010, you wrote:
>Yes. The trigger will make the insert value, only if the PK value is null.
>But from entity framework, all my PK's are integer and sending zero value
to
>database..

If you want your trigger to work, don't include the PK in the INSERT
statement!

Helen


----------------------------------------------------------------------------
--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for
Conference
attendees to learn about information security's most important issues
through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4791 (20100120) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4791 (20100120) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider



      
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to