I'm using EntityFramework as my ORM. I've created my code models using reverse engineer, and moved the generated domain objects to my core layer.
When I try to create a new entity that in the database has identity column with identity increment, and do SaveChanges() - it fails. I used profiler to see what's being sent to the database and I see that it tries to insert the identity column with zero as a value (since it's an integer it's automatically assigned zero as value).
How can I tell Entity Framework mapping to ignore this field at insert? (I don't want to do this at the domain object - I rather keep domain object as plain as possible without specific annotations)
Edit
It appears to be because of an inheritance I've done. I've created an object that inherits from the object I'm trying to insert - but I don't see why that would bother it.