Table of Contents

Class UserRoleRepository

Namespace
Oqtane.Repository
Assembly
Oqtane.Server.dll
public class UserRoleRepository : IUserRoleRepository
Inheritance
UserRoleRepository
Implements

Constructors

UserRoleRepository(IDbContextFactory<TenantDBContext>, IRoleRepository, ITenantManager, UserManager<IdentityUser>, IMemoryCache)

public UserRoleRepository(IDbContextFactory<TenantDBContext> dbContextFactory, IRoleRepository roles, ITenantManager tenantManager, UserManager<IdentityUser> identityUserManager, IMemoryCache cache)

Parameters

dbContextFactory IDbContextFactory<TenantDBContext>
roles IRoleRepository
tenantManager ITenantManager
identityUserManager UserManager<IdentityUser>
cache IMemoryCache

Methods

AddUserRole(UserRole)

public UserRole AddUserRole(UserRole userRole)

Parameters

userRole UserRole

Returns

UserRole

DeleteUserRole(int)

public void DeleteUserRole(int userRoleId)

Parameters

userRoleId int

DeleteUserRoles(int)

public void DeleteUserRoles(int userId)

Parameters

userId int

GetUserRole(int)

public UserRole GetUserRole(int userRoleId)

Parameters

userRoleId int

Returns

UserRole

GetUserRole(int, bool)

public UserRole GetUserRole(int userRoleId, bool tracking)

Parameters

userRoleId int
tracking bool

Returns

UserRole

GetUserRole(int, int)

public UserRole GetUserRole(int userId, int roleId)

Parameters

userId int
roleId int

Returns

UserRole

GetUserRole(int, int, bool)

public UserRole GetUserRole(int userId, int roleId, bool tracking)

Parameters

userId int
roleId int
tracking bool

Returns

UserRole

GetUserRoles(int)

public IEnumerable<UserRole> GetUserRoles(int siteId)

Parameters

siteId int

Returns

IEnumerable<UserRole>

GetUserRoles(int, int)

public IEnumerable<UserRole> GetUserRoles(int userId, int siteId)

Parameters

userId int
siteId int

Returns

IEnumerable<UserRole>

GetUserRoles(string, int)

public IEnumerable<UserRole> GetUserRoles(string roleName, int siteId)

Parameters

roleName string
siteId int

Returns

IEnumerable<UserRole>

UpdateUserRole(UserRole)

public UserRole UpdateUserRole(UserRole userRole)

Parameters

userRole UserRole

Returns

UserRole