Example #1
0
        public EmptyResult PromoteAdjunct(PromoteIngredientViewModel promoteIngredientViewModel)
        {
            using (var unitOfWork = this.UnitOfWorkFactory.NewUnitOfWork())
            {
                this.BrewDataService.PromoteCustomIngredient <Adjunct>(promoteIngredientViewModel.IngredientId, promoteIngredientViewModel.Category);
                unitOfWork.Commit();
            }

            return(new EmptyResult());
        }
Example #2
0
        public EmptyResult PromoteHop(PromoteIngredientViewModel promoteIngredientViewModel)
        {
            if (promoteIngredientViewModel == null)
            {
                return(this.Issue404());
            }

            using (var unitOfWork = this.UnitOfWorkFactory.NewUnitOfWork())
            {
                this.BrewDataService.PromoteCustomIngredient <Hop>(promoteIngredientViewModel.IngredientId, promoteIngredientViewModel.Category);
                unitOfWork.Commit();
            }
            return(new EmptyResult());
        }