linq query to check if record exists
Code Example - linq query to check if record exists
if (dc.Users.Any(u => u.Name == name))
{
// Do something here
}
if (dc.Users.Any(u => u.Name == name))
{
// Do something here
}