public async Task <IActionResult> PutCityInfo(int id, CityInfo cityInfo) { if (id != cityInfo.Id) { return(BadRequest()); } _context.Entry(cityInfo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CityInfoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutSubjects(int id, Subjects subjects) { if (id != subjects.id) { return(BadRequest()); } _context.Entry(subjects).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SubjectsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }