Sources/Infrastructure/Repositories/UsersRepository.UserRoleStore.cs
/// <summary>
/// Get identity role by role name
/// </summary>
/// <param name="roleName">identity role name</param>
/// <param name="sqlConnection">sql connection instance</param>
/// <returns>identity role object</returns>
Get identity role by role name
Get identity role by role name
private async Task<IdentityRole<int>> GetIdentityRoleAsync(SqlConnection sqlConnection, string roleName)
        {
            DynamicParameters dynamicParameters = new DynamicParameters();
            dynamicParameters.Add("@NormalizedName", roleName);
            return await sqlConnection.QueryFirstOrDefaultAsync<IdentityRole<int>>(Constants.PS_AspNetRoles_SelectByNormalizedName,
                dynamicParameters, commandType: CommandType.StoredProcedure).ConfigureAwait(false);
        }
private async Task < IdentityRole < int > > GetIdentityRoleAsync ( SqlConnection sqlConnection , string roleName ) { DynamicParameters dynamicParameters = new DynamicParameters ( ) ; dynamicParameters . Add ( " " , roleName ) ; return await sqlConnection . QueryFirstOrDefaultAsync < IdentityRole < int > > ( Constants . PS_AspNetRoles_SelectByNormalizedName , dynamicParameters , commandType : CommandType . StoredProcedure ) . ConfigureAwait ( false ) ; }
Get identity role by role name
Get identity role by role name
identity role object
identity role object
sqlConnection
SqlConnection
sql connection instance
sql connection instance
roleName
string
identity role name
identity role name