0
ITBMO created
Is it possible to create entity without Id column ? How ?
Basically we have an entity with composite key and the records are deleted and entered frequently, that means if we have identity primary key the key values will be increased drastically on frequent add/delete records. So we do not want any identity primary key for that entity, just composite key as a primary key.
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
3 Answer(s)
-
0
Hi,
You can ignore Id field in OnModelCreating of your dbContext. Should be soething like this:
modelBuilder.Entity<Entity>().Ignore(t => t.Propert);Thanks.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Exactly what i was looking for, thanks for the reply and solution.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Thanks for your feedback
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)