public Task <IEnumerable <Recipe> > GetRecipesByTime(double maxTime) { return(Task.Run(() => RecipesFactory .GetRecipesWithBasicDetails() .Where(x => x.TimeInMinutes <= maxTime))); }
public Task <IEnumerable <Recipe> > GetRecipesByCategory(string category) { return(Task.Run(() => RecipesFactory .GetRecipesWithBasicDetails() .Where(x => x.Category.ToString() == category))); }
public Task <IEnumerable <Recipe> > GetRecipeByIngredients(string[] ingredients) { return(Task.Run(() => RecipesFactory .GetRecipesWithBasicDetails() .Where(x => x.Ingredients.Any(i => ingredients.Contains(i.Name))))); }