You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you have a large number of id's from a UI or from an external system. You want to query against these id's. The classic Where(entity => ids.Contains(entity.Id)) is very slow.
I would love to see a mechanic for getting data using table value parameters. A syntax like this or similar
db.ExecuteTableValueQuery(ids)
Since it returns a IQueryable it could be used like this with good performance
db.ExecuteTableValueQuery(ids)
.Join(db.Set<MyEntity>(), id => id, e => e.Id, (id, e) => e);
The table value parameter type could be fixed by convention, if ids is a IEnumerable<int> it will try to use a sql type called ef__core_int_tvp or similar convention.
The text was updated successfully, but these errors were encountered:
This is similar enough to #13239 to close as duplicate.
@AndersMalmgren it would be great if you could take a look at that issue and elaborate on any additional aspects you see missing, e.g. the convention for naming of tables types.
Sometimes you have a large number of id's from a UI or from an external system. You want to query against these id's. The classic Where(entity => ids.Contains(entity.Id)) is very slow.
I would love to see a mechanic for getting data using table value parameters. A syntax like this or similar
Since it returns a IQueryable it could be used like this with good performance
The table value parameter type could be fixed by convention, if ids is a
IEnumerable<int>
it will try to use a sql type calledef__core_int_tvp
or similar convention.The text was updated successfully, but these errors were encountered: