I know it was asked before, but I haven't managed to find up-to-date and complete answer for it.
So, what is the most efficient way to get a list of entities by their primary keys?
We have two separate cases, I guess:
- The primary key is simple i.e. over one column
For instance, I have
IEnumerable<int> idsI want to get all entities whereIdof entity is inids - The primary key is composite i.e. over multiple columns
Similar as above but
idsis something likeIEnumerable<Tuple<int, int, int>>, for instance