Class ChannelDbRepository
- Namespace
- NLightning.Infrastructure.Repositories.Database.Channel
- Assembly
- NLightning.Infrastructure.Repositories.dll
public class ChannelDbRepository : BaseDbRepository<ChannelEntity>, IChannelDbRepository
- Inheritance
-
ChannelDbRepository
- Implements
- Inherited Members
Constructors
ChannelDbRepository(NLightningDbContext, IMessageSerializer, ISha256)
public ChannelDbRepository(NLightningDbContext context, IMessageSerializer messageSerializer, ISha256 sha256)
Parameters
context
NLightningDbContextmessageSerializer
IMessageSerializersha256
ISha256
Methods
AddAsync(ChannelModel)
public Task AddAsync(ChannelModel channelModel)
Parameters
channelModel
ChannelModel
Returns
GetAllAsync()
public Task<IEnumerable<ChannelModel>> GetAllAsync()
Returns
GetByIdAsync(ChannelId)
public Task<ChannelModel?> GetByIdAsync(ChannelId channelId)
Parameters
channelId
ChannelId
Returns
GetByPeerIdAsync(CompactPubKey)
public Task<IEnumerable<ChannelModel?>> GetByPeerIdAsync(CompactPubKey peerNodeId)
Parameters
peerNodeId
CompactPubKey
Returns
GetReadyChannelsAsync()
public Task<IEnumerable<ChannelModel>> GetReadyChannelsAsync()
Returns
UpdateAsync(ChannelModel)
public Task UpdateAsync(ChannelModel channelModel)
Parameters
channelModel
ChannelModel