public async Task <IActionResult> Edit(int id, [Bind("Id,LastUpdated,RequestTypeStep,ServiceRequest")] StepHistories stepHistories)
        {
            if (id != stepHistories.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(stepHistories);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StepHistoriesExists(stepHistories.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["RequestTypeStep"] = new SelectList(_context.RequestTypeSteps, "Id", "StepDescription", stepHistories.RequestTypeStep);
            ViewData["ServiceRequest"]  = new SelectList(_context.ServiceRequests, "Id", "RequestDescription", stepHistories.ServiceRequest);
            return(View(stepHistories));
        }
        public async Task <IActionResult> Create([Bind("Id,LastUpdated,RequestTypeStep,ServiceRequest")] StepHistories stepHistories)
        {
            if (ModelState.IsValid)
            {
                _context.Add(stepHistories);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["RequestTypeStep"] = new SelectList(_context.RequestTypeSteps, "Id", "StepDescription", stepHistories.RequestTypeStep);
            ViewData["ServiceRequest"]  = new SelectList(_context.ServiceRequests, "Id", "RequestDescription", stepHistories.ServiceRequest);
            return(View(stepHistories));
        }