public async Task <IActionResult> PutTelegram(long id, Telegram telegram) { if (id != telegram.Id) { return(BadRequest()); } _context.Entry(telegram).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TelegramExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }