-
Notifications
You must be signed in to change notification settings - Fork 192
Closed
Description
I used codefrist to generate tables and primary keys, and automatically generated new sequences for each primary key.
Like this:
But I added the code as follows:
using (BloggingContext db = new BloggingContext()) { db.Blogs.Add(new Blog { Url = "aaaaa1" }); db.SaveChanges(); }
I will get an error message:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Because I didn't copy the primary key。
I found the sequence of ForOracleUseSequenceHiLo method settings
like this
entity.Property(o => o.Id).ForOracleUseSequenceHiLo("aa_sq");
But I can't determine the automatically generated sequence name. Or do you have a better way to connect directly?
Metadata
Metadata
Assignees
Labels
No labels