示例#1
0
        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);
        }
示例#2
0
        public async Task <ICollection <SentRecipe> > getAllSentRecipe()
        {
            ICollection <Recipe> rs = _repo.GetAllRecipes();

            return(SentRecipe.MapMany(rs));
        }