public async Task <IActionResult> Post([FromBody] HireDTO hire)
        {
            Guid id = await _hireService.CreateHire(hire);

            await _notificationHubContext.Clients.All.SendAsync("ReceiveOffer", _hireService.GetHireById(id));

            return(Ok(id));
        }
Ejemplo n.º 2
0
        public Task <Guid> CreateHire(HireDTO hireDTO)
        {
            Hire hire = _mapper.Map <HireDTO, Hire>(hireDTO);

            hire.Status          = HireStatus.Open;
            hire.TotalHiringRate = GetTotalHiringRate(hire);

            return(_hireStore.Create(hire));
        }
        public IActionResult Get(Guid id)
        {
            HireDTO hire = _hireService.GetHireById(id);

            return(Ok(hire));
        }