I am currently using the entity-framework with SQLite. I am currently inserting entity with an ID (that is autogenerated by SQLite but it is not autoincrement’ed. See this). This field is marked as StoreGeneratedPattern = "Identity" in the .edmx.
I would like to insert entity in the table and be able to specify an ID (so the database won’t have to generate one).
Once the field is configured with
StoreGeneratedPattern.Identityyou cannot modify it in the application. That is how it works. If you try to do it EF will either skip your modification or throws exception. If you need to define key on the client you don’t have to generate key in the database and you must setStoreGeneratedPattern.None.