Rename refactoring

This commit is contained in:
franc
2025-04-17 10:49:40 +02:00
parent c225eedc8b
commit 0d6b9eb294
3 changed files with 3 additions and 3 deletions
@@ -25,7 +25,7 @@
[HttpGet("/Home/Search")] [HttpGet("/Home/Search")]
public async Task<IActionResult> Search(string query) public async Task<IActionResult> Search(string query)
{ {
var recipes = await _recipeRepository.SerachRecipeAndIngredientAsync(query); var recipes = await _recipeRepository.SearchRecipeAndIngredientAsync(query);
return PartialView("_SearchResultsPartial", recipes); return PartialView("_SearchResultsPartial", recipes);
} }
} }
@@ -17,6 +17,6 @@
Task<Recipe> CreateRecipeForCategoryAsync(Category category, string name, string description, Difficulty difficulty, int servings, TimeSpan preparationTime, TimeSpan cookingTime); Task<Recipe> CreateRecipeForCategoryAsync(Category category, string name, string description, Difficulty difficulty, int servings, TimeSpan preparationTime, TimeSpan cookingTime);
Task<IEnumerable<Recipe>> SerachRecipeAndIngredientAsync(string searchterm); Task<IEnumerable<Recipe>> SearchRecipeAndIngredientAsync(string searchterm);
} }
} }
@@ -147,7 +147,7 @@
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
} }
public async Task<IEnumerable<Recipe>> SerachRecipeAndIngredientAsync(string searchTerm) public async Task<IEnumerable<Recipe>> SearchRecipeAndIngredientAsync(string searchTerm)
{ {
var queryable = _context.Recipes var queryable = _context.Recipes
.Include(r => r.RecipeIngredients) .Include(r => r.RecipeIngredients)