Does Entity Framework 4 support generators for id values ​​such as NHibernate?

Does Entity Framework 4 support generators for id values ​​such as NHibernate? NHibernate has generator classes to help with this.

+7
generator entity-framework
Mar 09
source share
1 answer

EF4 supports everything that the server supports:

  • IDENTITY or GUID columns with default values ​​(newid (), newsequentialid ()) in SQL Server
  • Oracle Sequences
  • any other mechanism the target database can provide
As far as I know, EF4 itself does not have built-in support for any type of generator.

I'm not sure that making ORM a responsibility is a good idea, to be honest. In my opinion, this really should be addressed to the backend store.

However, it will not be difficult for you to implement your own identifier generator in .NET code and connect it to EF4 if you want to.

+4
Mar 09 '10 at 13:12
source share
— -



All Articles