Esempio n. 1
0
        public IActionResult Read([FromServices] ITarefaRepository repository)
        {
            var id      = new Guid(User.Identity.Name);
            var tarefas = repository.Read(id);

            return(Ok(tarefas));
        }
Esempio n. 2
0
 public CadastroTarefaAppService(
     ITarefaRepository tarefaRepository,
     IUnitOfWork unitOfWork)
 {
     _tarefaRepository = tarefaRepository;
     _unitOfWork       = unitOfWork;
 }
 public TarefaController(
     ITarefaRepository tarefaRepository,
     UserManager <ApplicationUser> userManager)
 {
     _tarefaRepository = tarefaRepository;
     _userManager      = userManager;
 }
Esempio n. 4
0
 public TarefaController()
 {
     //Instanciamos o objeto, a classe
     //Não podemos instanciar a interface, mas por que?
     //
     _tarefaRepository = new TarefaRepositorio();
 }
Esempio n. 5
0
 public ToDoController(ITarefaRepository tarefaRepository)
 {
     _tarefaRepository   = tarefaRepository;
     cliente.BaseAddress = new Uri("https://localhost:44357");
     cliente.DefaultRequestHeaders.Accept.Clear();
     cliente.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
 }
Esempio n. 6
0
 public TarefaService(
     ITarefaRepository tarefaRepository
     , IMapper mapper)
 {
     this.mapper           = mapper;
     this.tarefaRepository = tarefaRepository;
 }
 public TarefaService(
     ITarefaRepository tarefaRepository,
     ITarefaReadOnlyRepository tarefaReadOnlyRepository)
 {
     _tarefaRepository         = tarefaRepository;
     _tarefaReadOnlyRepository = tarefaReadOnlyRepository;
 }
Esempio n. 8
0
 public FluxoTrabalhoModel(IWorkflowRepository workflowRepository,
                           ITarefaRepository tarefaRepository,
                           IHubContext <FluxoTrabalhoHub> hubContext)
 {
     _workflowRepository = workflowRepository;
     _tarefaRepository   = tarefaRepository;
     _hubContext         = hubContext;
 }
Esempio n. 9
0
 public IncluirModel(IImpedimentoTarefaRepository impedimentoTarefaRepository,
                     IRepository <ImpedimentoModel> impedimentoRepository,
                     ITarefaRepository tarefaRepository)
 {
     _impedimentoTarefaRepository = impedimentoTarefaRepository;
     _impedimentoRepository       = impedimentoRepository;
     _tarefaRepository            = tarefaRepository;
 }
 public TarefaCommandHandler(ITarefaRepository tarefaRepository,
                             IUnitOfWork uow,
                             INotificationHandler <DomainNotification> notifications,
                             IMediatorHandler mediator) : base(uow, mediator, notifications)
 {
     _tarefaRepository = tarefaRepository;
     _mediator         = mediator;
 }
Esempio n. 11
0
 public ITarefaRepository TarefaRepository()
 {
     if (tarefaRepository == null)
     {
         tarefaRepository = new TarefaRepository(_sqlConn, _sqlTrans);
     }
     return(tarefaRepository);
 }
Esempio n. 12
0
 public HomeController(IHttpContextAccessor httpContext, ITarefaRepository tarefaRepository, IUsuarioRepository usuarioRepository, IAtividadeRepository atividadeRepository)
 {
     this.httpContext         = httpContext;
     this.tarefaRepository    = tarefaRepository;
     this.usuarioRepository   = usuarioRepository;
     this.atividadeRepository = atividadeRepository;
     usuarioLogado            = usuarioRepository.GetUsuarioId(httpContext.HttpContext.Session.GetInt32("UsuarioLogadoId"));
 }
Esempio n. 13
0
 public TarefaService(ITarefaRepository baseRepository, ILogRepository logRepository, ITipoTarefaRepository tipoRepository, ITarefaAnexoRepository anexoRepository, IUsuarioRepository usuRepository) : base(baseRepository)
 {
     _baseRepository  = baseRepository;
     _logRepository   = logRepository;
     _tipoRepository  = tipoRepository;
     _anexoRepository = anexoRepository;
     _usuRepository   = usuRepository;
 }
Esempio n. 14
0
 public AlterarModel(IRecursoTarefaRepository recursoTarefaRepository,
                     IRecursoProjetoRepository recursoProjetoRepository,
                     ITarefaRepository tarefaRepository)
 {
     _recursoTarefaRepository  = recursoTarefaRepository;
     _recursoProjetoRepository = recursoProjetoRepository;
     _tarefaRepository         = tarefaRepository;
 }
Esempio n. 15
0
 public TarefaService(ITarefaRepository tarefaRepository, IUnitOfWork unitOfWork, IWorkflowService workflowService, IApontamentoService apontamentoService, IImpedimentoTarefaService impedimentoTarefaService)
     : base(tarefaRepository, unitOfWork)
 {
     _tarefaRepository         = tarefaRepository;
     _workflowService          = workflowService;
     _apontamentoService       = apontamentoService;
     _impedimentoTarefaService = impedimentoTarefaService;
 }
Esempio n. 16
0
 public TarefaCommandHandler(ITarefaRepository tarefaRepository,
                             IUnitOfWork uow,
                             IMediatorHandler bus,
                             INotificationHandler <DomainNotification> notifications) : base(uow, bus, notifications)
 {
     _tarefaRepository = tarefaRepository;
     Bus = bus;
 }
Esempio n. 17
0
 public TarefasController(INotificationHandler <DomainNotification> notifications,
                          ITarefaRepository tarefaRepository,
                          IMapper mapper,
                          IMediatorHandler mediator) : base(notifications, mediator)
 {
     _tarefaRepository = tarefaRepository;
     _mapper           = mapper;
     _mediator         = mediator;
 }
Esempio n. 18
0
 public TarefasController(ITarefaRepository tarefaRepository,
                          ITarefaService tarefaService,
                          IMapper mapper,
                          INotificador notificador) : base(notificador)
 {
     _tarefaRepository = tarefaRepository;
     _tarefaService    = tarefaService;
     _mapper           = mapper;
 }
Esempio n. 19
0
 public IActionResult Create([FromBody] Tarefa model, [FromServices] ITarefaRepository repository)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest());
     }
     model.UsuarioId = new Guid(User.Identity.Name);
     repository.Create(model);
     return(Ok());
 }
Esempio n. 20
0
 public TarefaAppService(IMapper mapper,
                         ITarefaRepository tarefaRepository,
                         IMediatorHandler bus,
                         IEventStoreRepository eventStoreRepository)
 {
     _mapper           = mapper;
     _tarefaRepository = tarefaRepository;
     Bus = bus;
     _eventStoreRepository = eventStoreRepository;
 }
 public TarefaService(ITarefaRepository tarefaRepository,
                      IValidator <CriarTarefaRequest> criarTarefaRequestValidator,
                      ITarefaAdapter tarefaAdapter,
                      IValidator <AlterarTarefaRequest> alterarTarefaRequestValidator)
 {
     _tarefaRepository            = tarefaRepository;
     _criarTarefaRequestValidator = criarTarefaRequestValidator;
     _tarefaAdapter = tarefaAdapter;
     _alterarTarefaRequestValidator = alterarTarefaRequestValidator;
 }
Esempio n. 22
0
        public IActionResult Update(string id, [FromBody] Tarefa model, [FromServices] ITarefaRepository repository)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            repository.Update(new Guid(id), model);
            return(Ok());
        }
Esempio n. 23
0
        public IActionResult Put([FromBody] Tarefa tarefa, [FromServices] ITarefaRepository repository)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            repository.Update(tarefa);

            return(Ok());
        }
Esempio n. 24
0
 public TarefaController(
     UserManager <ApplicationUser> userManager,
     IListaSecaoRepository listaSecaoRepository,
     ITarefaRepository tarefaRepository,
     IListaRepository listaRepository)
 {
     _listaRepository      = listaRepository;
     _listaSecaoRepository = listaSecaoRepository;
     _tarefaRepository     = tarefaRepository;
     _userManager          = userManager;
 }
        public IActionResult Create([FromBody] Tarefa model, [FromServices] ITarefaRepository repository)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            repository.Create(model);

            return(Ok());
        }
 public IActionResult Read([FromServices] ITarefaRepository repository)
 {
     try{
         var id      = new Guid(User.Identity.Name);
         var tarefas = repository.Read(id);
         return(Ok(tarefas));
     }
     catch (Exception e) {
         return(BadRequest(e));
     }
 }
Esempio n. 27
0
 public AlterarModel(ITarefaRepository tarefaRepository,
                     IRepository <ProjetoModel> projetoRepository,
                     IRepository <SistemaModel> sistemaRepository,
                     IWorkflowRepository workflowRepository,
                     IRepository <TipoTarefaModel> tipoTarefaRepository)
 {
     _tarefaRepository     = tarefaRepository;
     _projetoRepository    = projetoRepository;
     _sistemaRepository    = sistemaRepository;
     _workflowRepository   = workflowRepository;
     _tipoTarefaRepository = tipoTarefaRepository;
 }
Esempio n. 28
0
        public IActionResult Create([FromBody] Tarefa tarefa, [FromServices] ITarefaRepository repository)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            tarefa.UsuarioId = Guid.Parse(User.Identity.Name);

            repository.Create(tarefa);

            return(Ok());
        }
 public TarefaHub(ITarefaRepository repository)
 {
     _repository = repository;
 }
Esempio n. 30
0
 public UpdateCommandTarefaHandler(ITarefaRepository repository)
 {
     _repository = repository;
 }
Esempio n. 31
0
 public TarefaController()
 {
     _tarefaRepository = new TarefaRepository();
 }
 public TarefaService(ITarefaRepository repository, IExportadorTarefa geradorPdf)
 {
     _repository = repository;
     _geradorPdf = geradorPdf;
 }
 public TarefaDataManager()
 {
     _repository = new TarefaDao();
     _control = new TarefaControl(_repository);
 }
 public TarefaService(ITarefaRepository tarefaRepository)
 {
     _tarefaRepository = tarefaRepository;
 }
Esempio n. 35
0
 /// <summary>
 /// É responsável por definir o repositório do UserControl
 /// Este método é chamado no constructor da classe TarefaDataManager
 ///</summary>
 /// <param name="repository"></param>
 public TarefaControl(ITarefaRepository repository)
     : this()
 {
     _repository = repository;
 }
Esempio n. 36
0
 public TarefaController(ITarefaRepository tarefaRepository)
 {
     _tarefaRepository = tarefaRepository;
 }
 public TarefaAppService(ITarefaRepository tarefaRepository, ITarefaService tarefaService)
 {
     _tarefaRepository = tarefaRepository;
     _tarefaService = tarefaService;
 }
 public TarefaDataManager()
 {
     _repository = new TarefaDao();
     _control = new TarefaControl(_repository);
     _tarefaService = new TarefaService(_repository, new GeradorTarefasPdf());
 }