Exemplo n.º 1
0
        public Recipe GetRecipeById(Guid id)
        {
            var recipe = repository.GetByIdWithRelationships(id);

            if (recipe.Stages?.Count > 0)
            {
                var stages = recipe.Stages;
                recipe.Stages = stages.OrderBy(s => s.Index).ToList();
            }

            return(recipe);
        }
Exemplo n.º 2
0
        public IActionResult GetRecipeType(Guid id)
        {
            var viewModel = mapper.Map(recipeTypeRepository.GetByIdWithRelationships(id));

            return(View(GET, viewModel));
        }
Exemplo n.º 3
0
 public Ingredient GetIngredientById(Guid id)
 {
     return(repository.GetByIdWithRelationships(id));
 }