Refactor Action class to RecAction

Replaced the `Action` class with a new `RecAction` class to represent the `VWREC_ACTION` database view. The `RecAction` class retains the same properties and annotations as the removed `Action` class, ensuring compatibility with the database schema.

Updated `RecDbContext` to use `RecAction`:
- Replaced `DbSet<Domain.Entities.Action>` with `DbSet<RecAction>`.
- Updated the `OnModelCreating` configuration to use `RecAction`.

This refactor improves clarity, aligns with naming conventions, and prepares the codebase for future changes.
This commit is contained in:
tekh 2025-11-25 14:16:41 +01:00
parent 163b5bc2f9
commit 1e22e4d851
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ namespace ReC.Domain.Entities;
/// requiring immediate code updates.
/// </summary>
[Table("VWREC_ACTION", Schema = "dbo")]
public class Action
public class RecAction
{
[Column("ACTION_ID")]
public long? ActionId { get; set; }

View File

@ -7,7 +7,7 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
{
public DbSet<EndpointParam> EndpointParams { get; set; }
public DbSet<Domain.Entities.Action> Actions { get; set; }
public DbSet<RecAction> Actions { get; set; }
public DbSet<OutRes> OutRes { get; set; }
@ -15,6 +15,6 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Domain.Entities.Action>().HasNoKey();
modelBuilder.Entity<RecAction>().HasNoKey();
}
}