public async Task <ActionResult <BranchRanks> > PostBranchRanks(BranchRanks branchRanks) { _context.BranchRanks.Add(branchRanks); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBranchRanks", new { id = branchRanks.Id }, branchRanks)); }
public async Task <IActionResult> PutBranchRanks(int id, BranchRanks branchRanks) { if (id != branchRanks.Id) { return(BadRequest()); } _context.Entry(branchRanks).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BranchRanksExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }