コード例 #1
0
 public ActionResult CreateActor(TBL_ACTORS collection)
 {
     _dispatcher.Execute <CreateActor>(new CreateActor()
     {
         Name = collection.Name,
         Sex  = collection.Sex,
         Bio  = collection.Bio,
         DOB  = collection.DOB
     });
     return(RedirectToAction("Create", "Movie"));
 }
コード例 #2
0
 public ActionResult Create(TBL_ACTORS collection)
 {
     try
     {
         // TODO: Add insert logic here
         _dispatcher.Execute <CreateActor>(new CreateActor()
         {
             Name = collection.Name,
             Sex  = collection.Sex,
             Bio  = collection.Bio,
             DOB  = collection.DOB
         });
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         return(View());
     }
 }