//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// NewDeleteMotorcycleInteractor creates a new instance of a DeleteMotorcycleInteractor. /// </summary> /// /// <param name="motorcycleRepository"> The motorcycle repository. </param> /// <param name="authService"> The authentication service. </param> /// /// <returns> /// Returns (null, error) when there is an error, otherwise (DeleteMotorcycleInteractor, null). /// </returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public static (DeleteMotorcycleInteractor interactor, IError error) NewDeleteMotorcycleInteractor( IMotorcycleRepository motorcycleRepository, IAuthService authService) { var interactor = new DeleteMotorcycleInteractor { _motorcycleRepository = motorcycleRepository, _authService = authService }; // Validate the interactor var err = interactor.Validate(); if (err != null) { return(null, err); } // All okay return(interactor, null); }
public MotorcycleController(IMotorcycleRepository motorcycleRepository, IMapper mapper) { _motorcycleRepository = motorcycleRepository; _mapper = mapper; }
public MotorcycleController() { _motorcycleRepository = new FileMotorcycleRepository(); }
public MotorcycleController(IMotorcycleRepository motorcycleRepository) { _motorcycleRepository = motorcycleRepository; }