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 CreateStarAsync(StarDesc stardesc) { _context.StarDescs.Add(stardesc); await _context.SaveChangesAsync(); }