public async Task <IActionResult> PutMuseum_Information(int id, Museum_Information museum_Information) { if (id != museum_Information.midex) { return(BadRequest()); } _context.Entry(museum_Information).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Museum_InformationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Museum_Information> > PostMuseum_Information(Museum_Information museum_Information) { _context.Museum_Information.Add(museum_Information); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMuseum_Information", new { id = museum_Information.midex }, museum_Information)); }