cannot apply indexing with [] to an expression of type
.NET (Core and Framework)
1
Posts
1
Posters
0
Views
1
Watching
-
var dbPerson = from p in db.People
where p.Id == PersonId select p;
dbPerson[0].HolidaysRemaining--;is throwing me an error with dbPerson[0] saying cannot apply indexing with [] to an expression of type 'system.linq.lqueryable,holidayBookingApp.model.person> can someone please advise how I can resolve this? Thanks