public void TestMapMany() { var recipes = new List <Recipe>(); recipes.Add(new Recipe() { RecipeId = 1, RecipeAuthor = "Anis" }); recipes.Add(new Recipe() { RecipeId = 2, RecipeAuthor = "Nour" }); recipes.Add(new Recipe() { RecipeId = 3, RecipeAuthor = "Beau" }); var sentRecipe = SentRecipe.MapMany(recipes); Assert.Equal(sentRecipe.Count, recipes.Count); }
public async Task <ICollection <SentRecipe> > getAllSentRecipe() { ICollection <Recipe> rs = _repo.GetAllRecipes(); return(SentRecipe.MapMany(rs)); }