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

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

Public Methods

Method 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 method

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.
return void

CreateUser() public method

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
return void

CreateUserLog() public method

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

GetUser() public method

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

GetUser() public method

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

GetUserStatuses() public method

Gets users statuses
public GetUserStatuses ( ) : IEnumerable
return IEnumerable

GetUserTypes() public method

Gets usertypes
public GetUserTypes ( ) : IEnumerable
return IEnumerable

GetUsers() public method

Returns a collection of userinfo instances.
public GetUsers ( ) : IEnumerable
return IEnumerable

Login() public method

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
return Ru.GameSchool.DataLayer.Repository.UserInfo

Search() public method

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

UpdateUser() public method

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