Skip to content

Instantly share code, notes, and snippets.

@nishanc
Created May 6, 2019 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nishanc/26fff6fc992546a220776d6c69310ebb to your computer and use it in GitHub Desktop.
Save nishanc/26fff6fc992546a220776d6c69310ebb to your computer and use it in GitHub Desktop.
public async Task<bool> UserExists(string username)
{
if (await _context.Users.AnyAsync(x => x.Username == username))
return true;
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment