Interface IMemberRepository
Represents a repository for IMember entities.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface IMemberRepository : IContentRepository<int, IMember>, IReadWriteQueryRepository<int, IMember>, IReadRepository<int, IMember>, IWriteRepository<IMember>, IQueryRepository<IMember>, IRepository
Methods
View SourceExists(string)
Checks if a member with the username exists
Declaration
bool Exists(string username)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username |
Returns
| Type | Description |
|---|---|
| bool |
FindMembersInRole(string, string, StringPropertyMatchType)
Finds members in a given role
Declaration
IEnumerable<IMember> FindMembersInRole(string roleName, string usernameToMatch, StringPropertyMatchType matchType = StringPropertyMatchType.StartsWith)
Parameters
| Type | Name | Description |
|---|---|---|
| string | roleName | |
| string | usernameToMatch | |
| StringPropertyMatchType | matchType |
Returns
| Type | Description |
|---|---|
| IEnumerable<IMember> |
GetByMemberGroup(string)
Get all members in a specific group
Declaration
IEnumerable<IMember> GetByMemberGroup(string groupName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | groupName |
Returns
| Type | Description |
|---|---|
| IEnumerable<IMember> |
GetByUsername(string?)
Gets a member by their username.
Declaration
IMember? GetByUsername(string? username)
Parameters
| Type | Name | Description |
|---|---|---|
| string | username | The username of the member. |
Returns
| Type | Description |
|---|---|
| IMember | The member if found; otherwise, |
GetCountByQuery(IQuery<IMember>?)
Gets the count of items based on a complex query
Declaration
int GetCountByQuery(IQuery<IMember>? query)
Parameters
| Type | Name | Description |
|---|---|---|
| IQuery<IMember> | query |
Returns
| Type | Description |
|---|---|
| int |
GetMemberIds(string[])
Gets member identifiers by their names.
Declaration
int[] GetMemberIds(string[] names)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | names | The names of the members. |
Returns
| Type | Description |
|---|---|
| int[] | An array of member identifiers. |
GetPagedByFilterAsync(MemberFilter, int, int, Ordering?)
Gets paged members matching the specified filter.
Declaration
Task<PagedModel<IMember>> GetPagedByFilterAsync(MemberFilter memberFilter, int skip, int take, Ordering? ordering = null)
Parameters
| Type | Name | Description |
|---|---|---|
| MemberFilter | memberFilter | The filter to apply. |
| int | skip | The number of records to skip. |
| int | take | The number of records to take. |
| Ordering | ordering | The ordering to apply, or |
Returns
| Type | Description |
|---|---|
| Task<PagedModel<IMember>> | A paged model of members. |
UpdateLoginPropertiesAsync(IMember)
Saves only the properties related to login for the member, using an optimized, non-locking update.
Declaration
Task UpdateLoginPropertiesAsync(IMember member)
Parameters
| Type | Name | Description |
|---|---|---|
| IMember | member | The member to update. |
Returns
| Type | Description |
|---|---|
| Task | Used to avoid the full save of the member object after a login operation. |