Add HoopIntegrationEventLogs table for Hoop project.#19
Merged
dzmitrymorozov merged 2 commits intoJun 2, 2026
Merged
Conversation
eugene-paseka-softeq
approved these changes
Jun 1, 2026
There was a problem hiding this comment.
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
HoopIntegrationEventLogstable via a new migration set (migration + designer + model snapshot) underMigrations/HoopIntegrationEventLog. - Introduced
IntegrationEventLogContextBase<TContext>+IntegrationEventLogContextOptionsto make schema/table configurable and reusable across multiple contexts. - Updated
IntegrationEventLogServiceto work with an injectedDbContext/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}"; |
eugene-paseka-softeq
approved these changes
Jun 2, 2026
amnezin
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.