示例#1
0
        static void Main(string[] args)
        {
            var kernel = new StandardKernel(
                new DataAccessModule()
                );

            ICargoEsRepository repository = kernel.Get <ICargoEsRepository>();

            Console.WriteLine("Starting ingestion...");

            IEnumerable <Cargo> failures;

            repository.IngestCargos(
                Enumerable.Range(1, 1000)
                .Select(x => CargoBuilder.GenerateCargo())
                .ToList(),
                out failures
                );

            Console.WriteLine("Finished!");
        }