Refactor repository structure in WorkFlow.Infrastructure
Removed ProfileObjRepository and migrated its functionality to PObjectRepository. Updated DependencyInjection.cs to register the new repository for dependency injection, improving clarity and organization while maintaining existing functionality.
This commit is contained in:
parent
a3cbe69fd6
commit
69d417616d
@ -13,7 +13,7 @@ public static class DependencyInjection
|
||||
public static IServiceCollection AddWorkFlowRepositories(this IServiceCollection services)
|
||||
{
|
||||
services.TryAddScoped<IProfileRepository, ProfileRepository>();
|
||||
services.TryAddScoped<IProfileObjRepository, ProfileObjRepository>();
|
||||
services.TryAddScoped<IProfileObjRepository, PObjectRepository>();
|
||||
|
||||
services.AddDbRepository<WFDBContext, Config>(c => c.Configs).UseAutoMapper();
|
||||
services.AddDbRepository<WFDBContext, PControlsTF>(c => c.ProfileControlsTFs).UseAutoMapper();
|
||||
|
||||
@ -7,15 +7,15 @@ namespace WorkFlow.Infrastructure.Repositories;
|
||||
/// <summary>
|
||||
/// Repository implementation for retrieving <see cref="PObject"/> entities from the database.
|
||||
/// </summary>
|
||||
public class ProfileObjRepository : IProfileObjRepository
|
||||
public class PObjectRepository : IProfileObjRepository
|
||||
{
|
||||
private readonly WFDBContext _context;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ProfileObjRepository"/> class.
|
||||
/// Initializes a new instance of the <see cref="PObjectRepository"/> class.
|
||||
/// </summary>
|
||||
/// <param name="context">The database context used for accessing profile data.</param>
|
||||
public ProfileObjRepository(WFDBContext context)
|
||||
public PObjectRepository(WFDBContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user