public EmptyResult PromoteAdjunct(PromoteIngredientViewModel promoteIngredientViewModel) { using (var unitOfWork = this.UnitOfWorkFactory.NewUnitOfWork()) { this.BrewDataService.PromoteCustomIngredient <Adjunct>(promoteIngredientViewModel.IngredientId, promoteIngredientViewModel.Category); unitOfWork.Commit(); } return(new EmptyResult()); }
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()); }