I'm trying to understand whether it possible to get a single row from a database using entity framework without returning all the data. Maybe I'm misunderstanding how EF work but I believe its similar to the following:
TBL1
Id | Name | Place
1 | Teressa Green | UK
2 | Robin Banks | Germany
3 | Liam Neeson | Canada
If I want Robin Banks
Id do something similar to
context.tbl1.where(obj => obj.name = "Robin Banks")
However from what I've understood this is getting all data from the table and then filtering down to the one row. Is there a way to return just the one row back to the logic without initially returning all the data?
To put the my issue in one sentence. I'm trying to avoid loading back all rows when I just want 1.