public GendersController(IDeleteGenderCommand deleteGenderCommand, IGetGenderCommand getGenderCommand, IGetGendersCommand getGendersCommand, IInsertGenderCommand insertGenderCommand, IUpdateGenderCommand updateGenderCommand) { this.deleteGenderCommand = deleteGenderCommand; this.getGenderCommand = getGenderCommand; this.getGendersCommand = getGendersCommand; this.insertGenderCommand = insertGenderCommand; this.updateGenderCommand = updateGenderCommand; }
public IActionResult Delete(int id, [FromServices] IDeleteGenderCommand command) { _executor.ExecuteCommand(command, id); return(StatusCode(StatusCodes.Status204NoContent)); }