Class MemberRepository
Represents a repository for doing CRUD operations for
Inheritance
System.Object
Assembly: cs.temp.dll.dll
Syntax
public class MemberRepository : ContentRepositoryBase<int, IMember, MemberRepository>
Constructors
MemberRepository(IScopeAccessor, AppCaches, ILogger<MemberRepository>, IMemberTypeRepository, IMemberGroupRepository, ITagRepository, ILanguageRepository, IRelationRepository, IRelationTypeRepository, IPasswordHasher, PropertyEditorCollection, DataValueReferenceFactoryCollection, IDataTypeService, IJsonSerializer, IEventAggregator, IOptions<MemberPasswordConfigurationSettings>)
Declaration
public MemberRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger<MemberRepository> logger, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository, IPasswordHasher passwordHasher, PropertyEditorCollection propertyEditors, DataValueReferenceFactoryCollection dataValueReferenceFactories, IDataTypeService dataTypeService, IJsonSerializer serializer, IEventAggregator eventAggregator, IOptions<MemberPasswordConfigurationSettings> passwordConfiguration)
Parameters
Type |
Name |
Description |
IScopeAccessor |
scopeAccessor |
|
AppCaches |
cache |
|
ILogger<MemberRepository> |
logger |
|
IMemberTypeRepository |
memberTypeRepository |
|
IMemberGroupRepository |
memberGroupRepository |
|
ITagRepository |
tagRepository |
|
ILanguageRepository |
languageRepository |
|
IRelationRepository |
relationRepository |
|
IRelationTypeRepository |
relationTypeRepository |
|
IPasswordHasher |
passwordHasher |
|
PropertyEditorCollection |
propertyEditors |
|
DataValueReferenceFactoryCollection |
dataValueReferenceFactories |
|
IDataTypeService |
dataTypeService |
|
IJsonSerializer |
serializer |
|
IEventAggregator |
eventAggregator |
|
IOptions<MemberPasswordConfigurationSettings> |
passwordConfiguration |
|
Properties
NodeObjectTypeId
Declaration
protected override Guid NodeObjectTypeId { get; }
Property Value
Type |
Description |
System.Guid |
|
RecycleBinId
Declaration
public override int RecycleBinId { get; }
Property Value
Type |
Description |
System.Int32 |
|
This
Declaration
protected override MemberRepository This { get; }
Property Value
Methods
ApplySystemOrdering(ref Sql<ISqlContext>, Ordering)
Declaration
protected override string ApplySystemOrdering(ref Sql<ISqlContext> sql, Ordering ordering)
Parameters
Type |
Name |
Description |
Sql<ISqlContext> |
sql |
|
Ordering |
ordering |
|
Returns
Type |
Description |
System.String |
|
Exists(String)
Declaration
public bool Exists(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
Type |
Description |
System.Boolean |
|
FindMembersInRole(String, String, StringPropertyMatchType)
Declaration
public IEnumerable<IMember> FindMembersInRole(string roleName, string usernameToMatch, StringPropertyMatchType matchType = null)
Parameters
Type |
Name |
Description |
System.String |
roleName |
|
System.String |
usernameToMatch |
|
StringPropertyMatchType |
matchType |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMember> |
|
GetAllVersions(Int32)
Declaration
public override IEnumerable<IMember> GetAllVersions(int nodeId)
Parameters
Type |
Name |
Description |
System.Int32 |
nodeId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMember> |
|
GetBaseQuery(Boolean)
Declaration
protected override Sql<ISqlContext> GetBaseQuery(bool isCount)
Parameters
Type |
Name |
Description |
System.Boolean |
isCount |
|
Returns
GetBaseQuery(QueryType)
Declaration
protected override Sql<ISqlContext> GetBaseQuery(QueryType queryType)
Parameters
Returns
GetBaseQuery(QueryType, Boolean)
Declaration
protected virtual Sql<ISqlContext> GetBaseQuery(QueryType queryType, bool current)
Parameters
Type |
Name |
Description |
QueryType |
queryType |
|
System.Boolean |
current |
|
Returns
GetBaseWhereClause()
Declaration
protected override string GetBaseWhereClause()
Returns
Type |
Description |
System.String |
|
GetByMemberGroup(String)
Get all members in a specific group
Declaration
public IEnumerable<IMember> GetByMemberGroup(string groupName)
Parameters
Type |
Name |
Description |
System.String |
groupName |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMember> |
|
GetByUsername(String)
Declaration
public IMember GetByUsername(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
GetCountByQuery(IQuery<IMember>)
Declaration
public int GetCountByQuery(IQuery<IMember> query)
Parameters
Type |
Name |
Description |
IQuery<IMember> |
query |
|
Returns
Type |
Description |
System.Int32 |
|
GetDeleteClauses()
Declaration
protected override IEnumerable<string> GetDeleteClauses()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
GetMemberIds(String[])
Declaration
public int[] GetMemberIds(string[] usernames)
Parameters
Type |
Name |
Description |
System.String[] |
usernames |
|
Returns
Type |
Description |
System.Int32[] |
|
GetNodeIdQueryWithPropertyData()
Declaration
protected Sql<ISqlContext> GetNodeIdQueryWithPropertyData()
Returns
GetPage(IQuery<IMember>, Int64, Int32, out Int64, IQuery<IMember>, Ordering)
Gets paged member results.
Declaration
public override IEnumerable<IMember> GetPage(IQuery<IMember> query, long pageIndex, int pageSize, out long totalRecords, IQuery<IMember> filter, Ordering ordering)
Parameters
Type |
Name |
Description |
IQuery<IMember> |
query |
|
System.Int64 |
pageIndex |
|
System.Int32 |
pageSize |
|
System.Int64 |
totalRecords |
|
IQuery<IMember> |
filter |
|
Ordering |
ordering |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMember> |
|
GetVersion(Int32)
Declaration
public override IMember GetVersion(int versionId)
Parameters
Type |
Name |
Description |
System.Int32 |
versionId |
|
Returns
Declaration
protected override void PerformDeleteVersion(int id, int versionId)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
System.Int32 |
versionId |
|
Declaration
protected override IMember PerformGet(int id)
Parameters
Type |
Name |
Description |
System.Int32 |
id |
|
Returns
Declaration
protected override IEnumerable<IMember> PerformGetAll(params int[] ids)
Parameters
Type |
Name |
Description |
System.Int32[] |
ids |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMember> |
|
Declaration
protected override IEnumerable<IMember> PerformGetByQuery(IQuery<IMember> query)
Parameters
Type |
Name |
Description |
IQuery<IMember> |
query |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IMember> |
|
PersistNewItem(IMember)
Declaration
protected override void PersistNewItem(IMember entity)
Parameters
Type |
Name |
Description |
IMember |
entity |
|
PersistUpdatedItem(IMember)
Declaration
protected override void PersistUpdatedItem(IMember entity)
Parameters
Type |
Name |
Description |
IMember |
entity |
|
SetLastLogin(String, DateTime)
Declaration
public void SetLastLogin(string username, DateTime date)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.DateTime |
date |
|