Example #1
0
        public static List <Product> GetProducts(TiendaOnlineMvcContext context)
        {
            List <Product> products = new List <Product>()
            {
                new Product
                {
                    Id          = 1,
                    Name        = "Mesa",
                    Description = "De calidad",
                    CategoryId  = context.Categories.Find(1).Id
                },
                new Product
                {
                    Id          = 2,
                    Name        = "Sillaa",
                    Description = "Para sentarse",
                    CategoryId  = context.Categories.Find(1).Id
                },
                new Product
                {
                    Id          = 3,
                    Name        = "TV",
                    Description = "Para ver",
                    CategoryId  = context.Categories.Find(1).Id
                },
            };

            return(products);
        }