示例#1
0
        public IActionResult Detail([FromBody] EditScheduledDelivery command)
        {
            ScheduledDeliveryEditHandler.Execute(command, _postgresContext);
            ScheduledDeliveryConfirmHandler.Execute(command.DeliveryId, _postgresContext, _shopContext);

            return(RedirectToAction("List"));
        }
示例#2
0
        public static void Execute(EditScheduledDelivery command, PostgresContext postgresContext)
        {
            foreach (var scheduledDeliveryProduct in command.Products)
            {
                EditProduct(scheduledDeliveryProduct, postgresContext);
            }

            postgresContext.SaveChanges();
        }