コード例 #1
0
ファイル: InnitialDataSeeder.cs プロジェクト: horba/prizm
        private IList <Domain.Entity.Mill.Railcar> CreateRailcars(int num)
        {
            List <Domain.Entity.Mill.Railcar> cars = new List <Domain.Entity.Mill.Railcar>();

            for (int i = 0; i < num; i++)
            {
                var car = new Domain.Entity.Mill.Railcar
                {
                    Number      = RndString(10),
                    Certificate = RndString(8),
                    Destination = "Destination " + i,
                    IsActive    = true
                };
                firstSetupRepo.RailRepo.Save(car);
                cars.Add(car);
            }
            return(cars);
        }
コード例 #2
0
 private IList<Domain.Entity.Mill.Railcar> CreateRailcars(int num)
 {
     List<Domain.Entity.Mill.Railcar> cars = new List<Domain.Entity.Mill.Railcar>();
     for(int i = 0; i < num; i++)
     {
         var car = new Domain.Entity.Mill.Railcar
         {
             Number = RndString(10),
             Certificate = RndString(8),
             Destination = "Destination " + i,
             IsActive = true
         };
         firstSetupRepo.RailRepo.Save(car);
         cars.Add(car);
     }
     return cars;
 }