Table of Contents

Class ChannelConfigDbRepository

Namespace
NLightning.Infrastructure.Repositories.Database.Channel
Assembly
NLightning.Infrastructure.Repositories.dll
public class ChannelConfigDbRepository : BaseDbRepository<ChannelConfigEntity>, IChannelConfigDbRepository
Inheritance
ChannelConfigDbRepository
Implements
Inherited Members

Constructors

ChannelConfigDbRepository(NLightningDbContext)

public ChannelConfigDbRepository(NLightningDbContext context)

Parameters

context NLightningDbContext

Methods

Add(ChannelId, ChannelConfig)

Adds a new channel configuration

public void Add(ChannelId channelId, ChannelConfig config)

Parameters

channelId ChannelId

Channel ID

config ChannelConfig

Channel configuration

DeleteAsync(ChannelId)

Deletes a channel configuration

public Task DeleteAsync(ChannelId channelId)

Parameters

channelId ChannelId

Channel ID

Returns

Task

GetByChannelIdAsync(ChannelId)

Gets a channel configuration by channel ID

public Task<ChannelConfig?> GetByChannelIdAsync(ChannelId channelId)

Parameters

channelId ChannelId

Channel ID

Returns

Task<ChannelConfig?>

Channel configuration or null if not found

Update(ChannelId, ChannelConfig)

Updates an existing channel configuration

public void Update(ChannelId channelId, ChannelConfig config)

Parameters

channelId ChannelId

Channel ID

config ChannelConfig

Updated channel configuration