C# Класс Ru.GameSchool.BusinessLayer.Services.UserService

Service class that abstracts the interraction around the user entity with the data layer.
Наследование: BaseService
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

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

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

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.
Результат void

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

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
Результат void

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

Creates user log
public CreateUserLog ( UserLog userLog ) : void
userLog Ru.GameSchool.DataLayer.Repository.UserLog
Результат void

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

Gets a user by userId
public GetUser ( int userId ) : UserInfo
userId int Id of the user to get.
Результат Ru.GameSchool.DataLayer.Repository.UserInfo

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

Gets a user by username
public GetUser ( string username ) : UserInfo
username string Username of the user.
Результат Ru.GameSchool.DataLayer.Repository.UserInfo

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

Gets users statuses
public GetUserStatuses ( ) : IEnumerable
Результат IEnumerable

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

Gets usertypes
public GetUserTypes ( ) : IEnumerable
Результат IEnumerable

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

Returns a collection of userinfo instances.
public GetUsers ( ) : IEnumerable
Результат IEnumerable

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

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
Результат Ru.GameSchool.DataLayer.Repository.UserInfo

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

User search
public Search ( string search, System.Enums userT ) : IEnumerable
search string
userT System.Enums
Результат IEnumerable

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

Updates user info
public UpdateUser ( UserInfo userInfo ) : void
userInfo Ru.GameSchool.DataLayer.Repository.UserInfo
Результат void