public async Task <IActionResult> PutStar(int id, Star star) { if (id != star.StarId) { return(BadRequest()); } _context.Entry(star).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StarExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task EditStarDescAsync(StarDesc stardesc) { _context.Entry(stardesc).State = EntityState.Modified; await _context.SaveChangesAsync(); }