public async Task <IActionResult> PutPlanIndividual(long id, PlanIndividual planIndividual) { if (id != planIndividual.PlanIndividualId) { return(BadRequest()); } _context.Entry(planIndividual).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlanIndividualExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <PlanIndividual> > PostPlanIndividual(PlanIndividual planIndividual) { _context.PlanIndividual.Add(planIndividual); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPlanIndividual", new { id = planIndividual.PlanIndividualId }, planIndividual)); }