mirror of
https://github.com/bitwarden/server
synced 2026-02-26 17:33:40 +00:00
Document repositories
This commit is contained in:
@@ -254,6 +254,10 @@ public class OrganizationRepository : Repository<Organization, Guid>, IOrganizat
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decorator around the <see cref="OrganizationRepository"/> that tracks
|
||||
/// created Organizations for seeding.
|
||||
/// </summary>
|
||||
public class TestOrganizationTrackingOrganizationRepository : OrganizationRepository
|
||||
{
|
||||
private readonly IPlayDataService _playDataService;
|
||||
|
||||
@@ -474,6 +474,10 @@ public class UserRepository : Repository<User, Guid>, IUserRepository
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decorator around the <see cref="UserRepository"/> that tracks
|
||||
/// created Users for seeding.
|
||||
/// </summary>
|
||||
public class TestUserTrackingUserRepository : UserRepository
|
||||
{
|
||||
private readonly IPlayDataService _playDataService;
|
||||
|
||||
@@ -441,6 +441,10 @@ public class OrganizationRepository : Repository<Core.AdminConsole.Entities.Orga
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decorator around the <see cref="OrganizationRepository"/> that tracks
|
||||
/// created Organizations for seeding.
|
||||
/// </summary>
|
||||
public class TestOrganizationTrackingOrganizationRepository : OrganizationRepository
|
||||
{
|
||||
private readonly IPlayDataService _playDataService;
|
||||
|
||||
@@ -8,7 +8,6 @@ using Bit.Core.Services;
|
||||
using Bit.Infrastructure.EntityFramework.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
#nullable enable
|
||||
|
||||
@@ -18,7 +17,7 @@ public class UserRepository : Repository<Core.Entities.User, User, Guid>, IUserR
|
||||
{
|
||||
public UserRepository(IServiceScopeFactory serviceScopeFactory, IMapper mapper)
|
||||
: base(serviceScopeFactory, mapper, (DatabaseContext context) => context.Users)
|
||||
{}
|
||||
{ }
|
||||
|
||||
public async Task<Core.Entities.User?> GetByEmailAsync(string email)
|
||||
{
|
||||
@@ -501,6 +500,10 @@ public class UserRepository : Repository<Core.Entities.User, User, Guid>, IUserR
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Decorator around the <see cref="UserRepository"/> that tracks
|
||||
/// created Users for seeding.
|
||||
/// </summary>
|
||||
public class TestUserTrackingUserRepository : UserRepository
|
||||
{
|
||||
private readonly IPlayDataService _playDataService;
|
||||
|
||||
Reference in New Issue
Block a user