C# Class HBS.Data.Concrete.SecurityRepository

Inheritance: BaseRepository, ISecurityRepository
Mostra file Open project: heartbeatservice/HeartbeatServiceSolution

Public Methods

Method Description
AddRole ( Role role ) : int
AddUser ( UserProfile user ) : int
AddUserInRole ( int userId, int roleId ) : bool
GetAllRoles ( ) : List
GetAllUsers ( ) : IQueryable
GetRole ( int roleId ) : Role
GetRoles ( int companyId, string roleName ) : List
GetUser ( int userId ) : UserProfile
GetUser ( string userName ) : UserProfile
GetUserRoles ( int userId ) : List
GetUsers ( int companyId ) : List
GetUsers ( int companyId, string searchText ) : List
IsUserInRole ( int userId, int roleId ) : bool
IsUserNameExists ( int companyId, string searchText ) : bool
RemoveRole ( int roleId ) : bool
RemoveUserFromRole ( int roleId, int userId ) : bool
UpdateRole ( Role role ) : bool
UpdateUser ( UserProfile user ) : bool

Method Details

AddRole() public method

public AddRole ( Role role ) : int
role HBS.Entities.Role
return int

AddUser() public method

public AddUser ( UserProfile user ) : int
user HBS.Entities.UserProfile
return int

AddUserInRole() public method

public AddUserInRole ( int userId, int roleId ) : bool
userId int
roleId int
return bool

GetAllRoles() public method

public GetAllRoles ( ) : List
return List

GetAllUsers() public method

public GetAllUsers ( ) : IQueryable
return IQueryable

GetRole() public method

public GetRole ( int roleId ) : Role
roleId int
return HBS.Entities.Role

GetRoles() public method

public GetRoles ( int companyId, string roleName ) : List
companyId int
roleName string
return List

GetUser() public method

public GetUser ( int userId ) : UserProfile
userId int
return HBS.Entities.UserProfile

GetUser() public method

public GetUser ( string userName ) : UserProfile
userName string
return HBS.Entities.UserProfile

GetUserRoles() public method

public GetUserRoles ( int userId ) : List
userId int
return List

GetUsers() public method

public GetUsers ( int companyId ) : List
companyId int
return List

GetUsers() public method

public GetUsers ( int companyId, string searchText ) : List
companyId int
searchText string
return List

IsUserInRole() public method

public IsUserInRole ( int userId, int roleId ) : bool
userId int
roleId int
return bool

IsUserNameExists() public method

public IsUserNameExists ( int companyId, string searchText ) : bool
companyId int
searchText string
return bool

RemoveRole() public method

public RemoveRole ( int roleId ) : bool
roleId int
return bool

RemoveUserFromRole() public method

public RemoveUserFromRole ( int roleId, int userId ) : bool
roleId int
userId int
return bool

UpdateRole() public method

public UpdateRole ( Role role ) : bool
role Role
return bool

UpdateUser() public method

public UpdateUser ( UserProfile user ) : bool
user UserProfile
return bool