示例#1
0
        // Seed Brands
        private async Task SeedBrands()
        {
            _brands = await _brandService.GetAll();

            if (_brands.Any())
            {
                return;
            }

            _brands = new List <Brand>
            {
                new Brand {
                    Name        = "Aldo",
                    Description = "Aldo Shoes",
                    IsActive    = true,
                    ModifiedBy  = "Seed",
                    ModifiedOn  = DateTime.Now
                },
                new Brand {
                    Name        = "Nike",
                    Description = "Nike Shoes",
                    IsActive    = true,
                    ModifiedBy  = "Seed",
                    ModifiedOn  = DateTime.Now
                },
                new Brand {
                    Name        = "Rebook",
                    Description = "Rebook Shoes",
                    IsActive    = true,
                    ModifiedBy  = "Seed",
                    ModifiedOn  = DateTime.Now
                }
            };
            await _brandService.AddRange(_brands); // Add Brands
        }