Example #1
0
        public async Task <ActionResult <MovieActor> > DeleteMovieActor(int id, [FromBody] MovieActorsDeleteRequest request)
        {
            if (id <= 0 || request == null)
            {
                return(BadRequest());
            }

            await _movieActorRepository.DeleteMovieActor(id, request);

            return(NoContent());
        }
 public ActionResult DeleteConfirmed(int id)
 {
     try
     {
         _MovActRep.DeleteMovieActor(id);
         _MovActRep.save();
         return(RedirectToAction("Index"));
     }
     catch (DataException)
     {
         return(RedirectToAction("Delete",
                                 new System.Web.Routing.RouteValueDictionary {
             { "id", id },
             { "saveChangesError", true }
         }));
     }
 }