1
0
mirror of synced 2024-12-18 17:25:54 +01:00
GC-local-server-rewrite/Application/Game/Card/CardRequestHandlerBase.cs

21 lines
677 B
C#
Raw Normal View History

2023-02-09 10:25:42 +01:00
using Application.Common.Models;
using Application.Interfaces;
using MediatR;
using Microsoft.Extensions.Logging;
namespace Application.Game.Card;
public abstract class CardRequestHandlerBase<TIn, TOut>: IRequestHandlerWrapper<TIn, TOut>
where TIn : IRequestWrapper<TOut>
{
public ICardDbContext CardDbContext { get; }
public IMusicDbContext MusicDbContext { get; }
public CardRequestHandlerBase(ICardDependencyAggregate aggregate)
{
CardDbContext = aggregate.CardDbContext;
MusicDbContext = aggregate.MusicDbContext;
}
public abstract Task<ServiceResult<TOut>> Handle(TIn request, CancellationToken cancellationToken);
}