public CountriesController(IGetCountriesCommand getCountries, IGetCountryCommand getCountry, IAddCountryCommand addCountry, IEditCountryCommand editCountry, IDeleteCountryCommand deleteCountry) { this.getCountries = getCountries; this.getCountry = getCountry; this.addCountry = addCountry; this.editCountry = editCountry; this.deleteCountry = deleteCountry; }
public CountriesController(IGetCountriesCommand getCountries, IGetCountryCommand getCountry, IAddCountryCommand addCountry, IEditCountryCommand editCountry, IDeleteCountryCommand deleteCountry, UseCaseExecutor executor) { this.getCountries = getCountries; this.getCountry = getCountry; this.addCountry = addCountry; this.editCountry = editCountry; this.deleteCountry = deleteCountry; this.executor = executor; }
public Task <IActionResult> Get( [FromServices] IGetCountryCommand command, int countryId, CancellationToken cancellationToken) => command.ExecuteAsync(countryId, cancellationToken);