예제 #1
0
 public UpdateTransactionCommandhandler(
     IMapper mapper,
     SmartGroceryContext context,
     ProductUpdater productUpdater)
 {
     this.mapper         = mapper;
     this.context        = context;
     this.productUpdater = productUpdater;
 }
예제 #2
0
 public CreateTransactionCommandHandler(
     IMapper mapper,
     SmartGroceryContext context,
     ProductUpdater productUpdater,
     CustomerUpdater customerUpdater)
 {
     this.mapper          = mapper;
     this.context         = context;
     this.productUpdater  = productUpdater;
     this.customerUpdater = customerUpdater;
 }
예제 #3
0
파일: Program.cs 프로젝트: ROEL2407/Plus1
        static void RunMenu()
        {
            Console.WriteLine("What do you want to update?");
            string input = Console.ReadLine();

            switch (input)
            {
            case "products":
                ProductUpdater.Run();
                RunMenu();
                break;

            case "categories":
                CategoryUpdater.Run();
                RunMenu();
                break;

            case "promotions":
                break;

            case "all":
                ProductUpdater.Run();
                CategoryUpdater.Run();
                RunMenu();
                break;

            case "help":
                Console.WriteLine("- products");
                Console.WriteLine("- categories");
                Console.WriteLine("- all");
                RunMenu();
                break;

            default:
                Console.WriteLine("Unknown Command: Use 'help' for all available commands.");
                RunMenu();
                break;
            }
        }
예제 #4
0
 public DeleteTransactionCommandHandler(SmartGroceryContext context, ProductUpdater productUpdater)
 {
     this.context        = context;
     this.productUpdater = productUpdater;
 }