public BarsController(IBarsService service, IBarViewMapper mapper, ICocktailViewMapper cocktailMapper, ICocktailsService cocktailService) { _service = service ?? throw new ArgumentNullException("Bar service not found"); _mapper = mapper ?? throw new ArgumentNullException("Mapper not found"); _cocktailMapper = cocktailMapper ?? throw new ArgumentNullException("Mapper not found"); _cocktailService = cocktailService ?? throw new ArgumentNullException("Cocktail service not found"); }
public BarsController(IBarsService barsService, UserManager <IdentityUser> userManager, ApplicationDbContext db) { this.db = db; this.barsService = barsService; this.userManager = userManager; }
public HomeController(ILogger <HomeController> logger , IBarsService barsService , ICocktailsService cocktailsService , IBarViewMapper barMapper , ICocktailViewMapper cocktailMapper) { _logger = logger; _barsService = barsService; _cocktailsService = cocktailsService; _barMapper = barMapper; _cocktailMapper = cocktailMapper; }
public HomeController(IMappingService mappingService, IBarsService barsService) { if (mappingService == null) { throw new ArgumentNullException("Mapping service cannot be null."); } if (barsService == null) { throw new ArgumentNullException("Bars service cannot be null."); } this.mappingService = mappingService; this.barsService = barsService; }
public AddBarController(IMappingService mappingService, IRegionsService regionsService, IBarsService barsService, ICacheProvider cacheProvider, IServerProvider serverProvider, IPathProvider pathProvider) { if (mappingService == null) { throw new ArgumentNullException("Mapping service cannot be null."); } if (regionsService == null) { throw new ArgumentNullException("Regions service cannot be null."); } if (barsService == null) { throw new ArgumentNullException("Bars service cannot be null."); } if (cacheProvider == null) { throw new ArgumentNullException("Cache provider cannot be null."); } if (serverProvider == null) { throw new ArgumentNullException("Server provider cannot be null."); } if (pathProvider == null) { throw new ArgumentNullException("Path provider cannot be null."); } this.mappingService = mappingService; this.regionsService = regionsService; this.barsService = barsService; this.cacheProvider = cacheProvider; this.serverProvider = serverProvider; this.pathProvider = pathProvider; }
public BarController(IMappingService mappingService, IBarsService barsService, IReviewsService reviewsService, IRatingService ratingService, IUserProvider userProvider) { if (mappingService == null) { throw new ArgumentNullException("Mapping service cannot be null."); } if (barsService == null) { throw new ArgumentNullException("Bars service cannot be null."); } if (reviewsService == null) { throw new ArgumentNullException("Reviews service cannot be null."); } if (ratingService == null) { throw new ArgumentNullException("Rating service cannot be null."); } if (userProvider == null) { throw new ArgumentNullException("User provider cannot be null."); } this.mappingService = mappingService; this.barsService = barsService; this.reviewsService = reviewsService; this.ratingService = ratingService; this.userProvider = userProvider; }