public async Task <ActionResult <BanqInfo> > PostBanqInfo(BanqInfo banqInfo) { _context.BanqInfo.Add(banqInfo); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBanqInfo", new { id = banqInfo.Id }, banqInfo)); }
public async Task <IActionResult> PutBanqInfo(int id, BanqInfo banqInfo) { if (id != banqInfo.Id) { return(BadRequest()); } _context.Entry(banqInfo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BanqInfoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }