I am running a ASP.NET mvc5 app which currently has 5 million users. It is hosted in the Azure cloud. For the authentication I use the Asp.Net Identity for EntityFramework.
While I had to replace the userId guid with an int, I created a CustomUserStore. In this UserStore you can simply overwrite the FindByNameAsync:
public class CustomUserStore : UserStore where TUser : MyUser
{
public CustomUserStore(MyDbContext context) : base(context) { }
public override Task FindByNameAsync(string userName)
{
return this.GetUserAggregateAsync(u => u.UserName.Equals(userName, StringComparison.InvariantCultureIgnoreCase));
}
}
This results in a query without UPPER().