private AirplaneAppService ObterAirplaneAppService(AirplaneProjectContext context) { var uow = new UnitOfWork(context); var airplaneRepository = new AirplaneRepository(context); var airplaneValidator = new AirplaneValidation(airplaneRepository); var incluirAirplaneUsecase = new IncluirAirplaneUsecase(airplaneRepository, airplaneValidator, uow); var excluirAirplaneUsecase = new ExcluirAirplaneUsecase(airplaneRepository, airplaneValidator, uow); var editarAirplaneUsecase = new EditarAirplaneUsecase(airplaneRepository, airplaneValidator, uow); var mapper = MapperHelper.ConfigMapper(); return(new AirplaneAppService(airplaneRepository, editarAirplaneUsecase, incluirAirplaneUsecase, excluirAirplaneUsecase, mapper)); }
public AirplaneAppService(IAirplaneRepository repository, EditarAirplaneUsecase editarAirplaneUsecase, IncluirAirplaneUsecase incluirAirplaneUsecase, ExcluirAirplaneUsecase excluirAirplaneUsecase, IMapper mapper) : base(mapper) { this._repository = repository; this._editarAirplaneUsecase = editarAirplaneUsecase; this._incluirAirplaneUsecase = incluirAirplaneUsecase; this._excluirAirplaneUsecase = excluirAirplaneUsecase; }