Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            IUserService        userService;
            DomainManager       domainManager       = new DomainManager();
            InventoryContext    context             = new InventoryContext();
            UserServiceProvider userServiceProvider = new UserServiceProvider(context, domainManager);
            LogInService        logInService        = new LogInService(domainManager, userServiceProvider);
            var responce = logInService.LogInWithPassword("AElmendo", "Drizzle123!", false, InventorySoftwareType.PRODUCTS_SALES);

            userService = responce.Service;
            ProductDataManager dataManager   = new ProductDataManager(context, userService);
            ImportService      importService = new ImportService(dataManager);

            Console.WriteLine("Starting Service");
            importService.Load();
            Console.WriteLine("Importing Data");
            importService.ImportData();
            importService.Parse();
            Console.WriteLine("Import Finsihed");
            Console.WriteLine("Create Lots");
            var response = importService.Create();

            Console.WriteLine("Should be finished.  See results below:");
            Console.WriteLine(response.Message);
            Console.ReadKey();
        }