Im using EF 4.1 code first. I need to define a sequence to use for Oracle when an insert is made for an auto generated column.
This post:
http://www.devart.com/blogs/dotconnect/ ... ggers.html
Shows me how to do it with configuration:
devart:DefaultValue="MY_SEQUENCE.NEXTVAL"
But how would I define this using the fluent interface?
Thanks
Create a default value for a property using fluent interface
Microsoft doesn't allow to set DefaultValue in the current versoin of Code-First fluent mapping.
As we understood, you have a database. In this case you can generate a model for your database in Entity Developer, add the DbContext code generation template, and work with DbContext (without fluent mapping). DefaultValue can be used in this scenario because there is an XML-mapping.
We have removed your another post ("How to use a sequence default value with code first") as it is duplicated.
As we understood, you have a database. In this case you can generate a model for your database in Entity Developer, add the DbContext code generation template, and work with DbContext (without fluent mapping). DefaultValue can be used in this scenario because there is an XML-mapping.
We have removed your another post ("How to use a sequence default value with code first") as it is duplicated.