public async Task <ActionResult <ActorTemplates> > PostActorTemplates(ActorTemplates actorTemplates) { _context.ActorTemplates.Add(actorTemplates); await _context.SaveChangesAsync(); return(CreatedAtAction("GetActorTemplates", new { id = actorTemplates.ID }, actorTemplates)); }
public async Task <IActionResult> PutActorTemplates(int id, ActorTemplates actorTemplates) { if (id != actorTemplates.ID) { return(BadRequest()); } _context.Entry(actorTemplates).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ActorTemplatesExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }