Entity Framework by default does not make any collation specification in the generated SQL. Therefore, a query such as
var poses = await _dbContext.Users
.FirstOrDefaultAsync(p => p.UserName == userName);
will simply get translated to something like
SELECT TOP 1 u.*
FROM Users u
WHERE u.UserName = @userName;
There are case-sensitive and case-insensitive collations. The collation can be set on each column differently, although without specifying explicitly when creating it, it would take the database default collation.
Meanwhile, the collation of the variable is that of the current database. But it has lower precedence when being compared to a column reference. So it would all depend on the collation of the column.
On the other hand, a query such as
var poses = await _dbContext.Users
.FirstOrDefaultAsync(p => p.NormalizedUserName == userName.ToUpper());
becomes
SELECT TOP 1 u.*
FROM Users u
WHERE u.NormalizedUserName = UPPER(@userName);
and therefore the case-sensitivity of the collation makes no difference. There are other collation properties which could still be affected though.
Note that you also loose information by normalizing like this, which may or may not be what you want. Collation rules alone do not generally strip case information. This is why it's generally better to just set a case-insensitive collation for such a column, and be done.
Whatever you do, do not do this
var poses = await _dbContext.Users
.FirstOrDefaultAsync(p => p.UserName.ToUpper() == userName.ToUpper());
it would result in
SELECT TOP 1 u.*
FROM Users u
WHERE UPPER(u.UserName) = UPPER(@userName);
which cannot use indexes, and is an all-round bad idea.