public AddCocktailToBarController(CocktailMagicianContext context, IBarService barService, IBarCocktailsService barCocktailsService, ICocktailService cocktailService, IViewModelMapper <CocktailDto, CocktailViewModel> cocktailVmMapper) { this.context = context ?? throw new ArgumentNullException(nameof(context)); this.barService = barService ?? throw new ArgumentNullException(nameof(barService)); this.barCocktailsService = barCocktailsService ?? throw new ArgumentNullException(nameof(barCocktailsService)); this.cocktailService = cocktailService ?? throw new ArgumentNullException(nameof(cocktailService)); this.cocktailVmMapper = cocktailVmMapper ?? throw new ArgumentNullException(nameof(cocktailVmMapper)); }
//private readonly IViewModelMapper<BarDTO, AddCocktailsToBarViewModel> barCocktailsMapper; public BarController(IBarService barService, ICocktailService cocktailService, IBarCocktailsService barCockailService, IDTOMapper <CreateBarViewModel, BarDTO> barDTOMapper, IViewModelMapper <BarDTO, CreateBarViewModel> createBarViewModelMapper, IViewModelMapper <BarDTO, DisplayBarsViewModel> barViewModelMapper, IViewModelMapper <BarDTO, BarDetailsViewModel> barDetailsMapper, IViewModelMapper <AddCocktailDTO, CocktailsForBarViewModel> cocktailsForBarMapper, IViewModelMapper <CommentDTO, CommentViewModel> commentMapper, IViewModelMapper <ICollection <BarDTO>, CollectionViewModel> collectionMapper) { this.barService = barService; this.cocktailService = cocktailService; this.barCockailService = barCockailService; this.barDTOMapper = barDTOMapper; this.createBarViewModelMapper = createBarViewModelMapper; this.barViewModelMapper = barViewModelMapper; this.barDetailsMapper = barDetailsMapper; this.cocktailsForBarMapper = cocktailsForBarMapper; this.commentMapper = commentMapper; this.collectionMapper = collectionMapper; }