27 lines
831 B
C#
27 lines
831 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Strata.SqlTools.EFCore.Configurations;
|
|
using Strata.SqlTools.EFCore.Models;
|
|
using Strata.SqlTools.EFCore.Services;
|
|
|
|
namespace Strata.SqlTools.EFCore.Tests;
|
|
|
|
/// <summary>
|
|
/// Test DbContext for in-memory testing of QueryBreakdown entities.
|
|
/// </summary>
|
|
public class TestDbContext : DbContext
|
|
{
|
|
public DbSet<QueryBreakdownEntity> QueryBreakdowns { get; set; } = null!;
|
|
public DbSet<QueryParameterEntity> QueryParameters { get; set; } = null!;
|
|
public DbSet<WithClauseEntity> WithClauses { get; set; } = null!;
|
|
|
|
public TestDbContext(DbContextOptions options) : base(options)
|
|
{
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
modelBuilder.ConfigureQueryBreakdownEntities();
|
|
}
|
|
}
|