1
0
mirror of https://github.com/bitwarden/server synced 2026-02-26 17:33:40 +00:00

Document repositories

This commit is contained in:
Hinton
2025-12-16 20:33:01 +01:00
parent 24a196785d
commit 222ceadb2d
4 changed files with 17 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;