Skip to content

Instantly share code, notes, and snippets.

Created Jun 16, 2022
What would you like to do?
from user in _dbContext.Set<User>().AsNoTracking()
where user.Id == userId
let name = $"{user.FirstName} {user.LastName}"
let hasFirstName = !string.IsNullOrEmpty(user.FirstName)
let hasLastName = !string.IsNullOrEmpty(user.LastName)
select new
Name = name,
ProfileComplete = hasFirstName && hasLastName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment