Refactor to use RecActionView instead of RecAction
Replaced `RecAction` with `RecActionView` across the codebase to align with the `VWREC_ACTION` database view. Updated mappings, interfaces, and repository registrations accordingly. - Updated `DtoMappingProfile` to map `RecActionView` to `RecActionDto`. - Modified `IRecDbContext` to use `DbSet<RecActionView>`. - Refactored `ReadRecActionQueryHandler` to use `IRepository<RecActionView>`. - Removed the `RecAction` class entirely. - Updated `DependencyInjection` to register `RecActionView`. - Adjusted `RecDbContext` to replace `RecAction` with `RecActionView` and configure it as a keyless entity. - Introduced the `RecActionView` class, mirroring the structure of the removed `RecAction` class, with nullable properties for schema flexibility.
This commit is contained in:
@@ -17,7 +17,7 @@ public record ReadRecActionQueryBase
|
||||
|
||||
public record ReadRecActionQuery(ReadRecActionQueryBase Root) : ReadRecActionQueryBase(Root), IRequest<IEnumerable<RecActionDto>>;
|
||||
|
||||
public class ReadRecActionQueryHandler(IRepository<RecAction> repo, IMapper mapper) : IRequestHandler<ReadRecActionQuery, IEnumerable<RecActionDto>>
|
||||
public class ReadRecActionQueryHandler(IRepository<RecActionView> repo, IMapper mapper) : IRequestHandler<ReadRecActionQuery, IEnumerable<RecActionDto>>
|
||||
{
|
||||
public async Task<IEnumerable<RecActionDto>> Handle(ReadRecActionQuery request, CancellationToken cancel)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user