Beispiel #1
0
 public PointsOfInterestController(ILogger <PointsOfInterestController> logger, IMailService mailService, ICityInfoRepo cityInfoRepo, IMapper mapper)
 {
     _logger       = logger ?? throw new ArgumentNullException(nameof(logger));
     _mailService  = mailService ?? throw new ArgumentNullException(nameof(mailService));
     _cityInfoRepo = cityInfoRepo ?? throw new ArgumentNullException(nameof(cityInfoRepo));
     _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
 public CitiesController(ICityInfoRepo cityInfoRepo)
 {
     _cityInfoRepo = cityInfoRepo;
 }
Beispiel #3
0
 //constructot injection
 public PointsOfInterestController(ILogger <PointsOfInterestController> logger, IMailService mailService, ICityInfoRepo cityInfoRepo)
 {
     _logger       = logger;
     _mailService  = mailService;
     _cityInfoRepo = cityInfoRepo;
 }
 public CitiesController(ICityInfoRepo cityInfoRepo, IMapper mapper)
 {
     _cityInfoRepo = cityInfoRepo ?? throw new ArgumentNullException(nameof(cityInfoRepo));
     _mapper       = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }