Example #1
0
        static BicycleSeed()
        {
            const int bicycleCount = 5;

            DataToSeed = new Collection <Bicycle>();

            for (int i = 0; i < bicycleCount; i++)
            {
                var bicycle = new Bicycle
                {
                    Id            = Guid.NewGuid(),
                    Name          = $"Bicycle abc{i + 1}",
                    RentalStatus  = RandomHelpers.GetRentalStatus(),
                    Price         = 11999 + (i * 500),
                    TypeBicycleId = TypeBicycleSeed.DataToSeed.GetRandomElement().Id
                };

                DataToSeed.Add(bicycle);
            }
        }