Add DbSets for EndpointParam and view entities
Added DbSet properties for EndpointParam, RecActionView, and ProfileView to both IRecDbContext and RecDbContext. This enables querying and interaction with these entities and views in the database. Grouped the new DbSets under a #region for better code organization.
This commit is contained in:
@@ -7,6 +7,7 @@ namespace ReC.Application.Common.Interfaces;
|
|||||||
|
|
||||||
public interface IRecDbContext
|
public interface IRecDbContext
|
||||||
{
|
{
|
||||||
|
#region DbSets
|
||||||
public DbSet<EndpointParam> EndpointParams { get; set; }
|
public DbSet<EndpointParam> EndpointParams { get; set; }
|
||||||
|
|
||||||
public DbSet<RecActionView> RecActionViews { get; set; }
|
public DbSet<RecActionView> RecActionViews { get; set; }
|
||||||
@@ -32,6 +33,7 @@ public interface IRecDbContext
|
|||||||
public DbSet<RecAction> RecActions { get; set; }
|
public DbSet<RecAction> RecActions { get; set; }
|
||||||
|
|
||||||
public DbSet<InsertObjectResult> RecResults { get; set; }
|
public DbSet<InsertObjectResult> RecResults { get; set; }
|
||||||
|
#endregion DbSets
|
||||||
|
|
||||||
public Task<int> SaveChangesAsync(CancellationToken cancel = default);
|
public Task<int> SaveChangesAsync(CancellationToken cancel = default);
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ namespace ReC.Infrastructure;
|
|||||||
|
|
||||||
public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(options), IRecDbContext
|
public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(options), IRecDbContext
|
||||||
{
|
{
|
||||||
|
#region DB Sets
|
||||||
public DbSet<EndpointParam> EndpointParams { get; set; }
|
public DbSet<EndpointParam> EndpointParams { get; set; }
|
||||||
|
|
||||||
public DbSet<RecActionView> RecActionViews { get; set; }
|
public DbSet<RecActionView> RecActionViews { get; set; }
|
||||||
@@ -33,6 +34,7 @@ public class RecDbContext(DbContextOptions<RecDbContext> options) : DbContext(op
|
|||||||
public DbSet<RecAction> RecActions { get; set; }
|
public DbSet<RecAction> RecActions { get; set; }
|
||||||
|
|
||||||
public DbSet<InsertObjectResult> RecResults { get; set; }
|
public DbSet<InsertObjectResult> RecResults { get; set; }
|
||||||
|
#endregion DB Sets
|
||||||
|
|
||||||
// TODO: Update to configure via appsettings.json
|
// TODO: Update to configure via appsettings.json
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
|||||||
Reference in New Issue
Block a user