-
-
Save lgolubyev/fa812022bcb505a0badeb74df52bdbe7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ | |
user.Id, | |
Name = name, | |
ProfileComplete = hasFirstName && hasLastName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment