Exemple #1
0
 public AnuncioService(IHandler <DomainNotification> domainNotification,
                       IUnitOfWork unitOfWorkAtendimentos,
                       IAnuncioRepository anuncioRepository) :
     base(domainNotification, unitOfWorkAtendimentos)
 {
     _anuncioRepository = anuncioRepository;
 }
 public PromocionService(IAnuncioRepository anuncioRepository, IPromocionAnuncioRepository promocionAnuncioRepository, IUsuarioRepository usuarioRepository, IMapper mapper)
 {
     _anuncioRepository          = anuncioRepository;
     _usuarioRepository          = usuarioRepository;
     _promocionAnuncioRepository = promocionAnuncioRepository;
     _mapper = mapper;
 }
Exemple #3
0
 public RemoverAnuncio(
     IOutput outputHandler,
     IAnuncioRepository anuncioRepository)
 {
     _outputHandler     = outputHandler;
     _anuncioRepository = anuncioRepository;
 }
 public AnuncioController(IAnuncioRepository anuncioRepository, IDesafioOnlineWebMotors desafioOnlineWebMotors)
 {
     _criarAnuncio     = new CriarAnuncio(anuncioRepository);
     _consultasAnuncio = new ConsultasAnuncio(anuncioRepository);
     _consultasMarca   = new ConsultasMarca(desafioOnlineWebMotors);
     _consultasModelo  = new ConsultasModelo(desafioOnlineWebMotors);
     _consultasVersao  = new ConsultasVersao(desafioOnlineWebMotors);
 }
Exemple #5
0
 public AnuncioServices(IAnuncioRepository anuncioRepository, IMakeCrossCutting makeRepository,
                        IModelCrossCutting modelRepository, IVersionCrossCutting versionRepository)
 {
     _anuncioRepository = anuncioRepository;
     _makeRepository    = makeRepository;
     _modelRepository   = modelRepository;
     _versionRepository = versionRepository;
 }
        public IActionResult Read([FromServices] IAnuncioRepository repository)
        {
            var Id = new Guid(User.Identity.Name);

            var anuncios = repository.Read(Id);

            return(Ok(anuncios));
        }
        public IActionResult Update(string id, [FromBody] Anuncio model, [FromServices] IAnuncioRepository repository)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            repository.Update(new Guid(id), model);
            return(Ok());
        }
Exemple #8
0
        public void Setup()
        {
            MapperConfig.RegisterMappings();

            _dataContext       = new DataContext();
            _anuncioRepository = new AnuncioRepository(_dataContext);
            _anuncioService    = new AnuncioService(_anuncioRepository);
            _testHelper        = new TestHelper(_dataContext);

            _dataContext.Database.BeginTransaction();
        }
Exemple #9
0
 public ConsultarAnuncio(
     IOutput outputHandler,
     IAnuncioRepository anuncioRepository,
     IConfiguration config,
     IDistributedCache cache)
 {
     _config            = config;
     _cache             = cache;
     _outputHandler     = outputHandler;
     _anuncioRepository = anuncioRepository;
 }
Exemple #10
0
 public AnuncioService(IAnuncioRepository anuncioRepository, IAnuncioDetalleRepository anuncioDetalleRepository, IUsuarioRepository usuarioRepository, ITipoPropiedadRepository tipoPropiedadRepository,
                       IUbicacionRepository ubicacionRepository, IEvaluacionRepository evaluacionRepository, IImagenRepository imagenRepository, IMapper mapper)
 {
     _anuncioRepository        = anuncioRepository;
     _anuncioDetalleRepository = anuncioDetalleRepository;
     _usuarioRepository        = usuarioRepository;
     _ubicacionRepository      = ubicacionRepository;
     _imagenRepository         = imagenRepository;
     _evaluacionRepository     = evaluacionRepository;
     _tipoPropiedadRepository  = tipoPropiedadRepository;
     _mapper = mapper;
 }
        public IActionResult Create([FromBody] Anuncio model, [FromServices] IAnuncioRepository repository)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            model.VendedorId = new Guid(User.Identity.Name);

            repository.Create(model);
            return(Ok());
        }
Exemple #12
0
 public AtualizarAnuncio(
     IOutput outputHandler,
     IMarcaVeiculoService marcaVeiculoService,
     IModeloVeiculoService modeloVeiculoService,
     IVersaoVeiculoService versaoVeiculoService,
     IAnuncioRepository anuncioRepository)
 {
     _outputHandler        = outputHandler;
     _marcaVeiculoService  = marcaVeiculoService;
     _modeloVeiculoService = modeloVeiculoService;
     _versaoVeiculoService = versaoVeiculoService;
     _anuncioRepository    = anuncioRepository;
 }
Exemple #13
0
        public AnuncioService(IUnitOfWork unitOfWork, IMapper mapper,
                              IAnuncioRepository anuncioRepository)
        {
            if (_unitOfWork == null)
            {
                _unitOfWork = unitOfWork;
            }
            if (_mapper == null)
            {
                _mapper = mapper;
            }

            if (_anuncioRepository == null)
            {
                _anuncioRepository = anuncioRepository;
            }
        }
Exemple #14
0
        public TestHelper(DataContext context)
        {
            MapperConfig.RegisterMappings();

            _userRepository = new UserRepository(context);
            _userService    = new UserService(_userRepository);

            _marcaRepository = new MarcaRepository(context);
            _marcaService    = new MarcaService(_marcaRepository);

            _modeloRepository = new ModeloRepository(context);
            _modeloService    = new ModeloService(_modeloRepository);

            _anuncioRepository = new AnuncioRepository(context);
            _anuncioService    = new AnuncioService(_anuncioRepository);

            _mockBuilder = new MockBuilder();
        }
Exemple #15
0
 public IncluirAnuncio(
     IOutput outputHandler,
     IMarcaVeiculoService marcaVeiculoService,
     IModeloVeiculoService modeloVeiculoService,
     IVersaoVeiculoService versaoVeiculoService,
     IAnuncioRepository anuncioRepository,
     IUnitOfWork unitOfWork,
     IEntityFactory entityFactory,
     IConfiguration config,
     IDistributedCache cache)
 {
     _config               = config;
     _cache                = cache;
     _outputHandler        = outputHandler;
     _marcaVeiculoService  = marcaVeiculoService;
     _modeloVeiculoService = modeloVeiculoService;
     _versaoVeiculoService = versaoVeiculoService;
     _anuncioRepository    = anuncioRepository;
     _unitOfWork           = unitOfWork;
     _entityFactory        = entityFactory;
 }
 /// <summary>
 /// AnuncioBusiness
 /// </summary>
 /// <param name="repository"></param>
 public AnuncioBusiness(IAnuncioRepository repository) : base(repository)
 {
 }
 public AnunciosController(IAnuncioRepository anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
Exemple #18
0
 public AnuncioService(IAnuncioRepository anuncioRepository)
 {
     this.anuncioRepository = anuncioRepository;
 }
 public AnunciosController(IAnuncioRepository anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
 public AnuncioBusiness(IAnuncioRepository repository, IMapper mapper)
 {
     _repository       = repository;
     _AnuncioConverter = new AnuncioConverter(mapper);
 }
Exemple #21
0
 public ExcluirAnuncio(IAnuncioRepository anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
 public AnuncioService(IAnuncioRepository repository) : base(repository)
 {
 }
Exemple #23
0
 public VendaService(IVendaRepository repository, IAnuncioRepository anuncioRepository)
 {
     _repository        = repository;
     _anuncioRepository = anuncioRepository;
 }
 public AnuncioService(IAnuncioRepository anuncioRepository) : base(anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
Exemple #25
0
 public AnuncioApplication(IAnuncioRepository anuncioRepository,
                           IWebmotorsService webmotorsService)
 {
     _anuncioRepository = anuncioRepository;
     _webmotorsService  = webmotorsService;
 }
Exemple #26
0
 public AnuncioService(IAnuncioRepository repository)
 {
     _repository = repository;
 }
Exemple #27
0
 public AnunciosController(IAnuncioService servico, IAnuncioRepository repositorio, IClienteRepository clienteRepository)
 {
     _servico           = servico;
     _repositorio       = repositorio;
     _clienteRepository = clienteRepository;
 }
 public AnuncioAppService(IAnuncioRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
 public AnunciosController(AnuncioContext context, IAnuncioRepository anuncioRepository)
 {
     _context           = context;
     _anuncioRepository = anuncioRepository;
 }
Exemple #30
0
 public AnunciosController(IAnuncioRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Exemple #31
0
 public AtualizarAnuncioTest()
 {
     repository = new AnuncioRepository(new MockContext());
 }