public async Task <IActionResult> PutFeature(int id, Feature feature)
        {
            if (id != feature.FeatureId)
            {
                return(BadRequest());
            }

            _context.Entry(feature).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!FeatureExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PutTicket(int id, int userId, Ticket ticket)
        {
            if (id != ticket.TicketId)
            {
                return(BadRequest());
            }

            _context.Entry(ticket).State = EntityState.Modified;

            _context.History.Add(new History
            {
                Date       = DateTime.Now,
                TicketId   = ticket.TicketId,
                StatusId   = ticket.StatusId,
                ModifiedBy = userId
            });


            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TicketExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }