Ejemplo n.º 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;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 5
0
 public AnuncioServices(IAnuncioRepository anuncioRepository, IMakeCrossCutting makeRepository,
                        IModelCrossCutting modelRepository, IVersionCrossCutting versionRepository)
 {
     _anuncioRepository = anuncioRepository;
     _makeRepository    = makeRepository;
     _modelRepository   = modelRepository;
     _versionRepository = versionRepository;
 }
Ejemplo n.º 6
0
        public IActionResult Read([FromServices] IAnuncioRepository repository)
        {
            var Id = new Guid(User.Identity.Name);

            var anuncios = repository.Read(Id);

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

            repository.Update(new Guid(id), model);
            return(Ok());
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 9
0
 public ConsultarAnuncio(
     IOutput outputHandler,
     IAnuncioRepository anuncioRepository,
     IConfiguration config,
     IDistributedCache cache)
 {
     _config            = config;
     _cache             = cache;
     _outputHandler     = outputHandler;
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 11
0
        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());
        }
Ejemplo n.º 12
0
 public AtualizarAnuncio(
     IOutput outputHandler,
     IMarcaVeiculoService marcaVeiculoService,
     IModeloVeiculoService modeloVeiculoService,
     IVersaoVeiculoService versaoVeiculoService,
     IAnuncioRepository anuncioRepository)
 {
     _outputHandler        = outputHandler;
     _marcaVeiculoService  = marcaVeiculoService;
     _modeloVeiculoService = modeloVeiculoService;
     _versaoVeiculoService = versaoVeiculoService;
     _anuncioRepository    = anuncioRepository;
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 16
0
 /// <summary>
 /// AnuncioBusiness
 /// </summary>
 /// <param name="repository"></param>
 public AnuncioBusiness(IAnuncioRepository repository) : base(repository)
 {
 }
 public AnunciosController(IAnuncioRepository anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 18
0
 public AnuncioService(IAnuncioRepository anuncioRepository)
 {
     this.anuncioRepository = anuncioRepository;
 }
 public AnunciosController(IAnuncioRepository anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 20
0
 public AnuncioBusiness(IAnuncioRepository repository, IMapper mapper)
 {
     _repository       = repository;
     _AnuncioConverter = new AnuncioConverter(mapper);
 }
Ejemplo n.º 21
0
 public ExcluirAnuncio(IAnuncioRepository anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 22
0
 public AnuncioService(IAnuncioRepository repository) : base(repository)
 {
 }
Ejemplo n.º 23
0
 public VendaService(IVendaRepository repository, IAnuncioRepository anuncioRepository)
 {
     _repository        = repository;
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 24
0
 public AnuncioService(IAnuncioRepository anuncioRepository) : base(anuncioRepository)
 {
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 25
0
 public AnuncioApplication(IAnuncioRepository anuncioRepository,
                           IWebmotorsService webmotorsService)
 {
     _anuncioRepository = anuncioRepository;
     _webmotorsService  = webmotorsService;
 }
Ejemplo n.º 26
0
 public AnuncioService(IAnuncioRepository repository)
 {
     _repository = repository;
 }
Ejemplo n.º 27
0
 public AnunciosController(IAnuncioService servico, IAnuncioRepository repositorio, IClienteRepository clienteRepository)
 {
     _servico           = servico;
     _repositorio       = repositorio;
     _clienteRepository = clienteRepository;
 }
Ejemplo n.º 28
0
 public AnuncioAppService(IAnuncioRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Ejemplo n.º 29
0
 public AnunciosController(AnuncioContext context, IAnuncioRepository anuncioRepository)
 {
     _context           = context;
     _anuncioRepository = anuncioRepository;
 }
Ejemplo n.º 30
0
 public AnunciosController(IAnuncioRepository repository, IMapper mapper)
 {
     _repository = repository;
     _mapper     = mapper;
 }
Ejemplo n.º 31
0
 public AtualizarAnuncioTest()
 {
     repository = new AnuncioRepository(new MockContext());
 }