public async Task <IActionResult> PutTerminal([FromRoute] int id, [FromBody] TerminalVm terminalVm)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != terminalVm.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
 public async Task UpdateAsync(T entity)
 {
     _dbContext.Entry(entity).State = EntityState.Modified;
     await _dbContext.SaveChangesAsync();
 }