Skip to content

Add HoopIntegrationEventLogs table for Hoop project.#19

Merged
dzmitrymorozov merged 2 commits into
feature/HALOfrom
feature/HALO-27696-add-hoop-integration-event-log-context
Jun 2, 2026
Merged

Add HoopIntegrationEventLogs table for Hoop project.#19
dzmitrymorozov merged 2 commits into
feature/HALOfrom
feature/HALO-27696-add-hoop-integration-event-log-context

Conversation

@dzmitrymorozov
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Hoop-specific EF Core migration/context to create and target a dedicated HoopIntegrationEventLogs table, while refactoring the shared EventLog context/service to support configurable schema/table names.

Changes:

  • Added HoopIntegrationEventLogs table via a new migration set (migration + designer + model snapshot) under Migrations/HoopIntegrationEventLog.
  • Introduced IntegrationEventLogContextBase<TContext> + IntegrationEventLogContextOptions to make schema/table configurable and reusable across multiple contexts.
  • Updated IntegrationEventLogService to work with an injected DbContext/options and to use the configured table name for raw SQL queries.

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Softeq.NetKit.Integrations.EventLog/Migrations/HoopIntegrationEventLog/HoopIntegrationEventLogContextModelSnapshot.cs Adds EF snapshot for the Hoop event log table mapping.
Softeq.NetKit.Integrations.EventLog/Migrations/HoopIntegrationEventLog/20260601145915_AddHoopIntegrationEventLogs.Designer.cs Adds migration designer metadata for Hoop event logs.
Softeq.NetKit.Integrations.EventLog/Migrations/HoopIntegrationEventLog/20260601145915_AddHoopIntegrationEventLogs.cs Creates HoopIntegrationEventLogs table and indexes.
Softeq.NetKit.Integrations.EventLog/IntegrationEventLogService.cs Refactors service to support configurable schema/table and injected context.
Softeq.NetKit.Integrations.EventLog/IntegrationEventLogContextOptions.cs Introduces options object for schema/table configuration.
Softeq.NetKit.Integrations.EventLog/IntegrationEventLogContextFactory.cs Updates design-time context factory to supply the new options.
Softeq.NetKit.Integrations.EventLog/IntegrationEventLogContextBase.cs Adds a reusable base DbContext that applies schema/table configuration.
Softeq.NetKit.Integrations.EventLog/IntegrationEventLogContext.cs Switches the primary context to inherit from the new base context.
Softeq.NetKit.Integrations.EventLog/HoopIntegrationEventLogContextFactory.cs Adds design-time factory to generate Hoop migrations.
Softeq.NetKit.Integrations.EventLog/HoopIntegrationEventLogContext.cs Adds Hoop-specific DbContext inheriting from the shared base context.
Files not reviewed (1)
  • Softeq.NetKit.Integrations.EventLog/Migrations/HoopIntegrationEventLog/20260601145915_AddHoopIntegrationEventLogs.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/// 2. Edit project file: change the project TargetFramework to, for example, <TargetFramework>netcoreapp3.1</TargetFramework>
/// 2.1. Ensure project successfully builds. If not - change target framework to for failed projects to fix
/// 3. Open Package Manager Console. Set current project as the default project
/// 4. Create migration by running command: add-migration migration_name -context IntegrationEventLogContext
Comment on lines +4 to +22
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Softeq.NetKit.Integrations.EventLog.Extensions;
using Softeq.NetKit.Integrations.EventLog.Mappings;

namespace Softeq.NetKit.Integrations.EventLog
{
public abstract class IntegrationEventLogContextBase<TContext> : DbContext
where TContext : DbContext
{
private readonly IOptions<IntegrationEventLogContextOptions> _integrationEventLogOptions;

protected IntegrationEventLogContextBase(
DbContextOptions<TContext> options,
IOptions<IntegrationEventLogContextOptions> integrationEventLogOptions)
: base(options)
{
_integrationEventLogOptions = integrationEventLogOptions;
}
Comment on lines +6 to +11
public class IntegrationEventLogContextOptions
{
public string Schema { get; set; }

public string TableName { get; set; }
}
Comment on lines +24 to 26
public class IntegrationEventLogService<TContext> : IIntegrationEventLogService
where TContext : DbContext
{
Comment on lines +38 to +40
private DbSet<IntegrationEventLog> IntegrationEventLogs => _dbContext.Set<IntegrationEventLog>();

private string FullTableName => $"{_integrationEventLogContextOptions.Value.Schema}.{_integrationEventLogContextOptions.Value.TableName}";
@dzmitrymorozov dzmitrymorozov merged commit e67dfd1 into feature/HALO Jun 2, 2026
1 check passed
@dzmitrymorozov dzmitrymorozov deleted the feature/HALO-27696-add-hoop-integration-event-log-context branch June 2, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants