C# Класс DapperIdentity.Data.Repositories.UserRepository

Наследование: BaseRepository, IUserRepository
Показать файл Открыть проект

Открытые методы

Метод Описание
AddLoginAsync ( User user, Microsoft.AspNet.Identity.UserLoginInfo login ) : System.Threading.Tasks.Task

INSERT operation for adding an external login such as Google for a new or existing account.

CreateAsync ( User user ) : System.Threading.Tasks.Task

INSERT operation for a new user.

DeleteAsync ( User user ) : System.Threading.Tasks.Task

DELETE operation for a user. This is not currently used, but required by .NET Identity.

Dispose ( ) : void
FindAsync ( Microsoft.AspNet.Identity.UserLoginInfo login ) : Task

SELECT operation for getting the user object associated with a specific external login

FindByIdAsync ( string userId ) : Task

SELECT operation for finding a user by the Id value. Our Id is currently a GUID but this can be another data type as well.

FindByNameAsync ( string userName ) : Task

SELECT operation for finding a user by the username.

GetLoginsAsync ( User user ) : Task>

SELECT operation for getting external logins for a user account.

GetPasswordHashAsync ( User user ) : Task

Method for getting teh password hash for the user account.

GetSecurityStampAsync ( User user ) : Task

Method for getting the security stamp for the user account.

HasPasswordAsync ( User user ) : Task

Method for checking if an account has a password hash.

RemoveLoginAsync ( User user, Microsoft.AspNet.Identity.UserLoginInfo login ) : System.Threading.Tasks.Task

DELETE operation for removing an external login from an existing user account.

SetPasswordHashAsync ( User user, string passwordHash ) : System.Threading.Tasks.Task

Method for setting the password hash for the user account. This hash is used to encode the users password.

SetSecurityStampAsync ( User user, string stamp ) : System.Threading.Tasks.Task

Method for setting the security stamp for the user account.

UpdateAsync ( User user ) : System.Threading.Tasks.Task

UPDATE operation for updating a user.

UserRepository ( IConnectionFactory connectionFactory ) : System

User Repository constructor passing injected connection factory to the Base Repository

Описание методов

AddLoginAsync() публичный Метод

INSERT operation for adding an external login such as Google for a new or existing account.
public AddLoginAsync ( User user, Microsoft.AspNet.Identity.UserLoginInfo login ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The User object that will be associated with the external login information.
login Microsoft.AspNet.Identity.UserLoginInfo The user login information. This object is constructed during the callback from the external authority.
Результат System.Threading.Tasks.Task

CreateAsync() публичный Метод

INSERT operation for a new user.
public CreateAsync ( User user ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The User object must be passed in. We create this during the Register Action.
Результат System.Threading.Tasks.Task

DeleteAsync() публичный Метод

DELETE operation for a user. This is not currently used, but required by .NET Identity.
public DeleteAsync ( User user ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The User object
Результат System.Threading.Tasks.Task

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

FindAsync() публичный Метод

SELECT operation for getting the user object associated with a specific external login
public FindAsync ( Microsoft.AspNet.Identity.UserLoginInfo login ) : Task
login Microsoft.AspNet.Identity.UserLoginInfo The external account
Результат Task

FindByIdAsync() публичный Метод

SELECT operation for finding a user by the Id value. Our Id is currently a GUID but this can be another data type as well.
public FindByIdAsync ( string userId ) : Task
userId string The Id of the user object.
Результат Task

FindByNameAsync() публичный Метод

SELECT operation for finding a user by the username.
public FindByNameAsync ( string userName ) : Task
userName string The username of the user object.
Результат Task

GetLoginsAsync() публичный Метод

SELECT operation for getting external logins for a user account.
public GetLoginsAsync ( User user ) : Task>
user DapperIdentity.Core.Entities.User The user account to get external login information for.
Результат Task>

GetPasswordHashAsync() публичный Метод

Method for getting teh password hash for the user account.
public GetPasswordHashAsync ( User user ) : Task
user DapperIdentity.Core.Entities.User The user to get the password hash for.
Результат Task

GetSecurityStampAsync() публичный Метод

Method for getting the security stamp for the user account.
public GetSecurityStampAsync ( User user ) : Task
user DapperIdentity.Core.Entities.User The user to get the security stamp for.
Результат Task

HasPasswordAsync() публичный Метод

Method for checking if an account has a password hash.
public HasPasswordAsync ( User user ) : Task
user DapperIdentity.Core.Entities.User The user to check for an existing password hash.
Результат Task

RemoveLoginAsync() публичный Метод

DELETE operation for removing an external login from an existing user account.
public RemoveLoginAsync ( User user, Microsoft.AspNet.Identity.UserLoginInfo login ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The user object that the external login will be removed from.
login Microsoft.AspNet.Identity.UserLoginInfo The external login that will be removed from the user account.
Результат System.Threading.Tasks.Task

SetPasswordHashAsync() публичный Метод

Method for setting the password hash for the user account. This hash is used to encode the users password.
public SetPasswordHashAsync ( User user, string passwordHash ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The user to has the password for.
passwordHash string The password has to use.
Результат System.Threading.Tasks.Task

SetSecurityStampAsync() публичный Метод

Method for setting the security stamp for the user account.
public SetSecurityStampAsync ( User user, string stamp ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The user to set the security stamp for.
stamp string The stamp to set.
Результат System.Threading.Tasks.Task

UpdateAsync() публичный Метод

UPDATE operation for updating a user.
public UpdateAsync ( User user ) : System.Threading.Tasks.Task
user DapperIdentity.Core.Entities.User The user that will be updated. The updated values must be passed in to this method.
Результат System.Threading.Tasks.Task

UserRepository() публичный Метод

User Repository constructor passing injected connection factory to the Base Repository
public UserRepository ( IConnectionFactory connectionFactory ) : System
connectionFactory IConnectionFactory The injected connection factory. It is injected with the constructor argument that is the connection string.
Результат System