I am trying to change the default Razor scaffolded pages to allow users with blank passwords to be redirected to a page to change them. This is for an internal app where new people will be using the same accounts (They are week long contractors for a help desk system). I am following this post Creating Users with No Password using ASP.NET Identity with the response from Gzim Helshani. When I enter in the code:
var user = _context.AspNetUsers.First(p => p.UserName);
I receive an error message. The error message reads:
Severity Code Description Project File Line Suppression State Error CS1662 Cannot convert lambda expression to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type \Areas\Identity\Pages\Account\Login.cshtml.cs 77 Active
and that I cannot implicitly convert type string to bool. I am very new to ASP.Net and I am wondering how I can get around this error. Any help can be appreciated.