I received a small linq request to find a client in a database:
var query =
from c in database.customer
where c.ID == input
select c;
Each client has an identifier, which in this case is set by the user - "enter"
All clients in the database are owned by Germany, but some of them must be copied to the database with a different value for the country (England instead of Germany).
Now, before adding them directly to the database, I want to check if the client has an “English version” in the database.
if (query.Where(c => c.country == "England"))
else
The problem is that this is not a regular if statement.
Is there a way to achieve what I want to express in this if-state?
thank
reveN source
share