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
ChannelIdChannel ID
config
ChannelConfigChannel configuration
DeleteAsync(ChannelId)
Deletes a channel configuration
public Task DeleteAsync(ChannelId channelId)
Parameters
channelId
ChannelIdChannel ID
Returns
GetByChannelIdAsync(ChannelId)
Gets a channel configuration by channel ID
public Task<ChannelConfig?> GetByChannelIdAsync(ChannelId channelId)
Parameters
channelId
ChannelIdChannel 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
ChannelIdChannel ID
config
ChannelConfigUpdated channel configuration