EF4 CodeFirst working Oracle samples

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

EF4 CodeFirst working Oracle samples

Post by Alladin » Sun 06 Feb 2011 12:39

Hi there,

I'm looking for code first EF4 samples working with DevArt Oracle EF provider.

No Microsoft example works so far.

Any help would be appreciated.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 08 Feb 2011 10:34

I have sent you a simple example.
We plan to blog about CTP 5 support in the near future.

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Post by Alladin » Tue 08 Feb 2011 11:11

Thank you very much / Большое Спасибо

Alladin
Posts: 149
Joined: Mon 27 Nov 2006 16:18
Contact:

Post by Alladin » Tue 08 Feb 2011 11:15

How does it work in Oracle:

[DatabaseGenerated(DatabaseGenerationOption.Identity)]

As far as I know, there is no identity columns...

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 08 Feb 2011 11:39

Our code creates a sequence and a BEFORE INSERT trigger initializing the auto-increment column.

lancelotti
Posts: 16
Joined: Tue 23 Feb 2010 18:28

Post by lancelotti » Fri 18 Feb 2011 11:25

AndreyR wrote:Our code creates a sequence and a BEFORE INSERT trigger initializing the auto-increment column.
Can I get this generated Id automatically after SaveChanges?

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 18 Feb 2011 14:45

EF code should populate this value automatically, if you have set the StoreGeneratedPattern attribute to Identity (actually, if the trigger and sequence are generated, you already have set this attribute correctly).

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 12 May 2011 14:42

We have released an article dealing with Code First support peculiarities here. It incorporates the changes introduced in EF 4.1 RTW.

Post Reply