Exemple #1
0
 protected override async Task <bool> UpdateAsync_Update(TRole role, CancellationToken cancellationToken = default) => await RoleTableQuery.Where(nameof(role.Id), role.Id).UpdateAsync(UpdateRole(role)) > 0;
Exemple #2
0
 protected override async Task <TRole> FindByIdAndConcurrencyStampAsync(TRole role, CancellationToken cancellationToken      = default) => await RoleTableQuery.Where(nameof(role.Id), role.Id).Where(nameof(role.ConcurrencyStamp), role.ConcurrencyStamp).FirstOrDefaultAsync <TRole>();
Exemple #3
0
 protected override async Task <TRole> FindByIdAsync_Select(string roleId, CancellationToken cancellationToken = default) => await RoleTableQuery.Where(nameof(DefaultRoleOrUser.Id), roleId).FirstOrDefaultAsync <TRole>();
Exemple #4
0
 protected override async Task <TRole> FindByNameAsync_Select(string normalizedRoleName, CancellationToken cancellationToken = default) => await RoleTableQuery.Where(nameof(DefaultRoleOrUser.NormalizedName), normalizedRoleName.ToLower()).FirstOrDefaultAsync <TRole>();
Exemple #5
0
 protected override async Task <bool> DeleteAsync_Delete(TRole role, CancellationToken cancellationToken       = default) => await RoleTableQuery.Where(nameof(role.Id), role.Id).DeleteAsync() > 0;