C# Class Ru.GameSchool.BusinessLayer.Services.UserService

Service class that abstracts the interraction around the user entity with the data layer.
Inheritance: BaseService
Afficher le fichier Open project: davidein/Ru.GameSchool Class Usage Examples

Méthodes publiques

Méthode Description
ChangeUserInfoPassword ( string newPassword, int userInfoId ) : void

Change the password of a userinfo instance.

CreateUser ( UserInfo userInfo ) : void

Gets a userinfo instance through a parameter of this function and if it isn't null persist it to the database.

CreateUserLog ( UserLog userLog ) : void

Creates user log

GetUser ( int userId ) : UserInfo

Gets a user by userId

GetUser ( string username ) : UserInfo

Gets a user by username

GetUserStatuses ( ) : IEnumerable

Gets users statuses

GetUserTypes ( ) : IEnumerable

Gets usertypes

GetUsers ( ) : IEnumerable

Returns a collection of userinfo instances.

Login ( string userName, string password, string ipAddress ) : UserInfo

Confirms that user credentials are authentic

Search ( string search, System.Enums userT ) : IEnumerable

User search

UpdateUser ( UserInfo userInfo ) : void

Updates user info

Method Details

ChangeUserInfoPassword() public méthode

Change the password of a userinfo instance.
public ChangeUserInfoPassword ( string newPassword, int userInfoId ) : void
newPassword string Clear text password that a user entered.
userInfoId int Id of a userinfo object.
Résultat void

CreateUser() public méthode

Gets a userinfo instance through a parameter of this function and if it isn't null persist it to the database.
public CreateUser ( UserInfo userInfo ) : void
userInfo Ru.GameSchool.DataLayer.Repository.UserInfo Instance of a userinfo
Résultat void

CreateUserLog() public méthode

Creates user log
public CreateUserLog ( UserLog userLog ) : void
userLog Ru.GameSchool.DataLayer.Repository.UserLog
Résultat void

GetUser() public méthode

Gets a user by userId
public GetUser ( int userId ) : UserInfo
userId int Id of the user to get.
Résultat Ru.GameSchool.DataLayer.Repository.UserInfo

GetUser() public méthode

Gets a user by username
public GetUser ( string username ) : UserInfo
username string Username of the user.
Résultat Ru.GameSchool.DataLayer.Repository.UserInfo

GetUserStatuses() public méthode

Gets users statuses
public GetUserStatuses ( ) : IEnumerable
Résultat IEnumerable

GetUserTypes() public méthode

Gets usertypes
public GetUserTypes ( ) : IEnumerable
Résultat IEnumerable

GetUsers() public méthode

Returns a collection of userinfo instances.
public GetUsers ( ) : IEnumerable
Résultat IEnumerable

Login() public méthode

Confirms that user credentials are authentic
public Login ( string userName, string password, string ipAddress ) : UserInfo
userName string The username reserved for the user to login to GameSchool.
password string Password to confirm the user is allowed to log into given username.
ipAddress string
Résultat Ru.GameSchool.DataLayer.Repository.UserInfo

Search() public méthode

User search
public Search ( string search, System.Enums userT ) : IEnumerable
search string
userT System.Enums
Résultat IEnumerable

UpdateUser() public méthode

Updates user info
public UpdateUser ( UserInfo userInfo ) : void
userInfo Ru.GameSchool.DataLayer.Repository.UserInfo
Résultat void