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