Example #1
0
        public async Task ShouldDeleteCustomerFromDatabase()
        {
            var command = new DeleteCustomerCommand(_context);

            await command.Execute("JASON");

            var entity = await _context.Customers.FindAsync("JASON");

            Assert.Null(entity);
        }
        public async Task <IActionResult> DeleteCustomer(string customerId, [FromServices] DeleteCustomerCommand command)
        {
            await command.Execute(customerId);

            return(Ok());
        }