コード例 #1
0
        public IActionResult InsertBothCustomer([FromServices] CustomerServiceA customerServiceA,
                                                [FromServices] CustomerServiceB customerServiceB, [FromBody] string name)
        {
            customerServiceA.AddCustomer(name);
            customerServiceB.AddCustomer(name);

            return(Ok());
        }
コード例 #2
0
        public IActionResult InsertNormalCustomer([FromServices] CustomerServiceB customerService, [FromBody] string name)
        {
            customerService.AddCustomer(name);

            return(Ok());
        }