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); }
public IActionResult GetRecipeType(Guid id) { var viewModel = mapper.Map(recipeTypeRepository.GetByIdWithRelationships(id)); return(View(GET, viewModel)); }
public Ingredient GetIngredientById(Guid id) { return(repository.GetByIdWithRelationships(id)); }