Exemple #1
0
        public async Task <IActionResult> PutFilmText(short id, FilmText filmText)
        {
            if (id != filmText.FilmId)
            {
                return(BadRequest());
            }

            _context.Entry(filmText).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!FilmTextExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Exemple #2
0
 public ActionResult Edit(ushort id, Actor actor)
 {
     _context.Entry(actor).State = EntityState.Modified;
     _context.SaveChanges();
     return(RedirectToAction("Index"));
 }