Reference to an ITVF raises a “second operation started on this context before a previous operation completed” exception
问题 I am attempting to reference an Inline Table-Valued Function (ITVF) in a Linq query: var results = await ( from v in _context.Vehicles from r in _context.UnitRepairStatus(v.VehicleNumber) <-- ITVF reference orderby v.VehicleNumber select new FooViewModel { ID = v.ID, VehicleNumber = v.VehicleNumber, InRepair = Convert.ToBoolean(r.InRepair) <-- ITFV field } ).ToListAsync(); When the query runs, it generates an error: InvalidOperationException: A second operation started on this context before