public CarAdDetailsQueryHandler( ICarAdQueryRepository carAdRepository, IDealerQueryRepository dealerRepository) { this.carAdRepository = carAdRepository; this.dealerRepository = dealerRepository; }
public LoginUserCommandHandler( IIdentity identity, IDealerQueryRepository dealerRepository) { this.identity = identity; this.dealerRepository = dealerRepository; }
public DeleteCarAdCommandHandler( ICurrentUser currentUser, ICarAdQueryRepository carAdRepository, IDealerQueryRepository dealerRepository) { this.currentUser = currentUser; this.carAdRepository = carAdRepository; this.dealerRepository = dealerRepository; }
public MineCarAdsQueryHandler( ICarAdQueryRepository carAdRepository, IDealerQueryRepository dealerRepository, ICurrentUser currentUser) : base(carAdRepository) { this.currentUser = currentUser; this.dealerRepository = dealerRepository; }
public ChangeAvailabilityCommandHandler( ICurrentUser currentUser, ICarAdQueryRepository carAdRepository, IDealerQueryRepository dealerRepository) { this.currentUser = currentUser; this.carAdRepository = carAdRepository; this.dealerRepository = dealerRepository; }
public CreateUserCommandHandler( IIdentity identity, IDealerFactory dealerFactory, IDealerQueryRepository dealerRepository) { this.identity = identity; this.dealerFactory = dealerFactory; this.dealerRepository = dealerRepository; }
public static async Task <Result> DealerHasCarAd( this ICurrentUser currentUser, IDealerQueryRepository dealerRepository, int carAdId, CancellationToken cancellationToken) { var dealerId = await dealerRepository.GetDealerId( currentUser.UserId, cancellationToken); var dealerHasCar = await dealerRepository.HasCarAd( dealerId, carAdId, cancellationToken); return(dealerHasCar ? Result.Success : "You cannot edit this car ad."); }
public DealerDetailsQueryHandler(IDealerQueryRepository dealerRepository) => this.dealerRepository = dealerRepository;