Пример #1
0
 public bool AddFilmCrew(FilmCrewModel model)
 {
     try
     {
         tblFilmCrew _tblFilmCrew = new tblFilmCrew();
         _tblFilmCrew.ID             = model.ID;
         _tblFilmCrew.Name           = model.Name;
         _tblFilmCrew.Sex            = model.Sex.ToString();
         _tblFilmCrew.DOB            = model.DOB;
         _tblFilmCrew.Bio            = model.Bio;
         _tblFilmCrew.DepartmentType = model.DepartmentType;
         _MoviesDBEntitiesContext.Entry(_tblFilmCrew).State = System.Data.Entity.EntityState.Added;
         _MoviesDBEntitiesContext.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Пример #2
0
 public IHttpActionResult AddFileCrew(FilmCrewModel model)
 {
     return(Ok <bool>(_MoviesReposotory.AddFilmCrew(model)));
 }
Пример #3
0
 public ActionResult Index(FilmCrewModel model)
 {
     model.FilmCrew = filmcrewSrv.GetEntries(model);
     return(View(model));
 }