예제 #1
0
        public ActionResult StartProduct([FromBody] JObject body)
        {
            var request = body.ToObject <StartProductRequest>();

            request.Now = DateTime.Now;
            var unitOfWork = new SahuarOSEFUnitOfWork(_context);
            var useCase    = new StartProductoUseCase(unitOfWork);
            var result     = useCase.Start(request);

            return(Ok());
        }
예제 #2
0
        public IActionResult Create([FromBody] JObject body)
        {
            var request = body.ToObject <NewOrderRequest>();

            request.Now = DateTime.Now;
            var eventDistpacher = new OrderSignalREventDistpacher(_orderHub);
            var unitOfWork      = new SahuarOSEFUnitOfWork(_context);
            var useCase         = new NewOrderUseCase(unitOfWork, eventDistpacher);
            var response        = useCase.CreateOrder(request);

            return(Json(response));
        }