public async Task <ActionResult <Subscribed_Rooms> > PostTodoItem(Subscribed_Rooms item) { _context.Subscribed_Rooms.Add(item); await _context.SaveChangesAsync(); return(CreatedAtAction(nameof(GetTodoItem), new { id = item.Id }, item)); }
public async Task <IActionResult> PutTodoItem(long id, Subscribed_Rooms item) { if (id != item.Id) { return(BadRequest()); } _context.Entry(item).State = EntityState.Modified; await _context.SaveChangesAsync(); return(NoContent()); }