示例#1
0
        private async Task SeedSize()
        {
            _sizes = await _sizeService.GetAll();

            if (_sizes.Any())
            {
                return;
            }
            _sizes = new List <Size>
            {
                new Size {
                    Number      = 7.5F,
                    Description = "US 5.5",
                    IsActive    = true,
                    ModifiedBy  = "Seed",
                    ModifiedOn  = DateTime.Now
                },
                new Size {
                    Number      = 8.0F,
                    Description = "US 8.0",
                    IsActive    = true,
                    ModifiedBy  = "Seed",
                    ModifiedOn  = DateTime.Now
                },
                new Size {
                    Number      = 8.5F,
                    Description = "US 8.5",
                    IsActive    = true,
                    ModifiedBy  = "Seed",
                    ModifiedOn  = DateTime.Now
                },
            };
            await _sizeService.AddRange(_sizes); // Add Brands
        }