I have this query in Linq:
var results = (from u in db.datos
where u.IdLogin == id
select u).ToList();
The problem arises when the user has not filled out their data and marks me an error since it does not find results, I had solved it with a try
and catch
but I would like to know if there is another way to solve this error .