Add CustDocBase64 entity and integrate into DbContext
Introduce a new entity class `CustDocBase64` mapped to the `TBCUST_DOC_BASE64` table in the `dbo` schema. This class includes properties for various document attributes. Update `TaskFlowDbContext` to include a `DbSet<CustDocBase64>` for querying and interacting with the table. Configure the entity in `OnModelCreating` to have no key and map it to the appropriate table and schema.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using DigitalData.TaskFlow.Domain.Entities;
|
||||
using DigitalData.TaskFlow.Infrastructure.Persistence.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
@@ -13,6 +14,11 @@ public sealed class TaskFlowDbContext(DbContextOptions<TaskFlowDbContext> option
|
||||
/// </summary>
|
||||
public DbSet<WorkflowListingReadModel> WorkflowListingReadModels => Set<WorkflowListingReadModel>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the keyless entity mapped to TBCUST_DOC_BASE64.
|
||||
/// </summary>
|
||||
public DbSet<CustDocBase64> CustDocBase64 => Set<CustDocBase64>();
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
@@ -22,5 +28,11 @@ public sealed class TaskFlowDbContext(DbContextOptions<TaskFlowDbContext> option
|
||||
entity.HasNoKey();
|
||||
entity.ToView(null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<CustDocBase64>(entity =>
|
||||
{
|
||||
entity.HasNoKey();
|
||||
entity.ToTable("TBCUST_DOC_BASE64", "dbo");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user