UserManagerExtensions.Find Method
Finds a user.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
Overload List
Name | Description | |
---|---|---|
![]() ![]() |
Find<TUser, TKey>(UserManager<TUser, TKey>, String, String) | Returns a user with the specified username and password or null if there is no match. |
![]() ![]() |
Find<TUser, TKey>(UserManager<TUser, TKey>, UserLoginInfo) | Finds a user. |
See Also
UserManagerExtensions Class
Microsoft.AspNet.Identity Namespace
Return to top
UserManagerExtensions.Find<TUser, TKey> Method (UserManager<TUser, TKey>, String, String)
Returns a user with the specified username and password or null if there is no match.
Syntax
public static TUser Find<TUser, TKey>(
this UserManager<TUser, TKey> manager,
string userName,
string password
)
where TUser : class, IUser<TKey>
where TKey : object, IEquatable<TKey>
public:
generic<typename TUser, typename TKey>
where TUser : ref class, IUser<TKey>
where TKey : Object, IEquatable<TKey>
[ExtensionAttribute]
static TUser Find(
UserManager<TUser, TKey>^ manager,
String^ userName,
String^ password
)
static member Find<'TUser, 'TKey when 'TUser : not struct and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>> :
manager:UserManager<'TUser, 'TKey> *
userName:string *
password:string -> 'TUser
<ExtensionAttribute>
Public Shared Function Find(Of TUser As { Class, IUser(Of TKey) }, TKey As { Object, IEquatable(Of TKey) }) (
manager As UserManager(Of TUser, TKey),
userName As String,
password As String
) As TUser
Parameters
manager
Type: Microsoft.AspNet.Identity.UserManager<TUser, TKey>The user manager.
userName
Type: System.StringThe name of the user.
password
Type: System.StringThe user password.
Return Value
Type: TUser
The result of the search.
Type Parameters
- TUser
The type of the user.
- TKey
The type of the key.
See Also
Return to top
UserManagerExtensions.Find<TUser, TKey> Method (UserManager<TUser, TKey>, UserLoginInfo)
Finds a user.
Syntax
public static TUser Find<TUser, TKey>(
this UserManager<TUser, TKey> manager,
UserLoginInfo login
)
where TUser : class, IUser<TKey>
where TKey : object, IEquatable<TKey>
public:
generic<typename TUser, typename TKey>
where TUser : ref class, IUser<TKey>
where TKey : Object, IEquatable<TKey>
[ExtensionAttribute]
static TUser Find(
UserManager<TUser, TKey>^ manager,
UserLoginInfo^ login
)
static member Find<'TUser, 'TKey when 'TUser : not struct and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>> :
manager:UserManager<'TUser, 'TKey> *
login:UserLoginInfo -> 'TUser
<ExtensionAttribute>
Public Shared Function Find(Of TUser As { Class, IUser(Of TKey) }, TKey As { Object, IEquatable(Of TKey) }) (
manager As UserManager(Of TUser, TKey),
login As UserLoginInfo
) As TUser
Parameters
manager
Type: Microsoft.AspNet.Identity.UserManager<TUser, TKey>The user manager.
login
Type: Microsoft.AspNet.Identity.UserLoginInfoThe user login.
Return Value
Type: TUser
The result of the search.
Type Parameters
- TUser
The type of the user.
- TKey
The type of the key.
See Also
Return to top