I have a function that returns an entity framework table, but i only need certain id's which are passed in via another entity list. I'm not sure the correct way to do this, i've tried the following but the list is causing issues...
public IEnumerable<Payment> PaymentsForContact(List<User> user) =>
_context.Payments.Where(p=> p.Id == user.Id;
Is there a way i can iterate through user object to only return the id's in user that are in _context.Payments?
Thanks in advance