mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Rename local repository to GenericRepository
This commit is contained in:
parent
1d553daeaf
commit
5b4dc1e9b0
@ -31,7 +31,7 @@ namespace Kyoo.Core.Controllers;
|
||||
/// <summary>
|
||||
/// A local repository to handle collections
|
||||
/// </summary>
|
||||
public class CollectionRepository(DatabaseContext database) : LocalRepository<Collection>(database)
|
||||
public class CollectionRepository(DatabaseContext database) : GenericRepository<Collection>(database)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override async Task<ICollection<Collection>> Search(
|
||||
|
@ -33,7 +33,7 @@ namespace Kyoo.Core.Controllers;
|
||||
/// A local repository to handle episodes.
|
||||
/// </summary>
|
||||
public class EpisodeRepository(DatabaseContext database, IRepository<Show> shows)
|
||||
: LocalRepository<Episode>(database)
|
||||
: GenericRepository<Episode>(database)
|
||||
{
|
||||
static EpisodeRepository()
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Kyoo.Core.Controllers;
|
||||
|
||||
public abstract class LocalRepository<T>(DatabaseContext database) : IRepository<T>
|
||||
public abstract class GenericRepository<T>(DatabaseContext database) : IRepository<T>
|
||||
where T : class, IResource, IQuery
|
||||
{
|
||||
public DatabaseContext Database => database;
|
@ -28,7 +28,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace Kyoo.Core.Controllers;
|
||||
|
||||
public class MovieRepository(DatabaseContext database, IRepository<Studio> studios)
|
||||
: LocalRepository<Movie>(database)
|
||||
: GenericRepository<Movie>(database)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override async Task<ICollection<Movie>> Search(
|
||||
|
@ -31,7 +31,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Kyoo.Core.Controllers;
|
||||
|
||||
public class SeasonRepository(DatabaseContext database) : LocalRepository<Season>(database)
|
||||
public class SeasonRepository(DatabaseContext database) : GenericRepository<Season>(database)
|
||||
{
|
||||
static SeasonRepository()
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
namespace Kyoo.Core.Controllers;
|
||||
|
||||
public class ShowRepository(DatabaseContext database, IRepository<Studio> studios)
|
||||
: LocalRepository<Show>(database)
|
||||
: GenericRepository<Show>(database)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override async Task<ICollection<Show>> Search(
|
||||
|
@ -29,7 +29,7 @@ namespace Kyoo.Core.Controllers;
|
||||
/// <summary>
|
||||
/// A local repository to handle studios
|
||||
/// </summary>
|
||||
public class StudioRepository(DatabaseContext database) : LocalRepository<Studio>(database)
|
||||
public class StudioRepository(DatabaseContext database) : GenericRepository<Studio>(database)
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override async Task<ICollection<Studio>> Search(
|
||||
|
@ -41,7 +41,7 @@ public class UserRepository(
|
||||
DbConnection db,
|
||||
SqlVariableContext context,
|
||||
PermissionOption options
|
||||
) : LocalRepository<User>(database), IUserRepository
|
||||
) : GenericRepository<User>(database), IUserRepository
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override async Task<ICollection<User>> Search(
|
||||
|
Loading…
x
Reference in New Issue
Block a user