public async Task <IActionResult> PutSiteMasterTbl([FromRoute] long id, [FromBody] SiteMasterTbl siteMasterTbl) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != siteMasterTbl.SiteId) { return(BadRequest()); } _context.Entry(siteMasterTbl).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SiteMasterTblExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }