public async Task <ActionResult <PersonalInfoTab> > PostPersonalInfoTab(PersonalInfoTab personalInfoTab) { _context.PersonalInfoTabs.Add(personalInfoTab); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPersonalInfoTab", new { id = personalInfoTab.ID }, personalInfoTab)); }
public async Task <IActionResult> PutPersonalInfoTab(int id, PersonalInfoTab personalInfoTab) { if (id != personalInfoTab.ID) { return(BadRequest()); } _context.Entry(personalInfoTab).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PersonalInfoTabExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }