Skip to content

Commit

Permalink
调整 UserStore 中的查询,以确保它可以在数据库中执行(而不是内存中)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jijie Chen committed Sep 26, 2018
1 parent 4015d98 commit f2384b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Task<User> FindByIdAsync(string userId, CancellationToken cancellationTok

public Task<User> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken)
{
var user = _useRepository.All().FirstOrDefault(u => string.Equals(u.UserName, normalizedUserName, StringComparison.InvariantCultureIgnoreCase));
var user = _useRepository.All().FirstOrDefault(u => u.UserName.ToUpper() == normalizedUserName.ToUpper());
return Task.FromResult(user);
}

Expand Down
2 changes: 1 addition & 1 deletion test/Discussion.Web.Tests/Utils/TestApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ internal TestApplication(bool initlizeApp)
{
if (initlizeApp)
{
BuildApplication(this, "Development");
BuildApplication(this, "UnitTest");
// BuildApplication(this);
}

Expand Down

0 comments on commit f2384b7

Please sign in to comment.