Quote:
IQueryable<TRecord> query = _context.ServerNames;
The
TRecord
generic type parameter is most like not in scope on that line.
And even if it is, you'd be trying to assign a set of
ServerNames
objects to a set of
TRecord
instances. Unless you have a generic type constraint in place to ensure that
TRecord
is derived from
ServerNames
, that's not going to work.
Instead, you need to use the correct type:
IQueryable<ServerNames> query = _context.ServerNames;