feat: 同步
This commit is contained in:
@@ -14,12 +14,11 @@ namespace Yi.Framework.Bbs.Domain.EventHandlers
|
||||
public class SeeDiscussEventHandler : ILocalEventHandler<SeeDiscussEventArgs>, ITransientDependency
|
||||
{
|
||||
private IRepository<DiscussEntity, Guid> _repository;
|
||||
public SeeDiscussEventHandler(IRepository<DiscussEntity,Guid> repository)
|
||||
public SeeDiscussEventHandler(IRepository<DiscussEntity, Guid> repository)
|
||||
{
|
||||
_repository = repository;
|
||||
}
|
||||
|
||||
public async Task HandleEventAsync(SeeDiscussEventArgs eventData)
|
||||
public async Task HandleEventAsync(SeeDiscussEventArgs eventData)
|
||||
{
|
||||
var entity = await _repository.GetAsync(eventData.DiscussId);
|
||||
if (entity is not null)
|
||||
@@ -31,5 +30,6 @@ namespace Yi.Framework.Bbs.Domain.EventHandlers
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user