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); } }
public IHttpActionResult AddFileCrew(FilmCrewModel model) { return(Ok <bool>(_MoviesReposotory.AddFilmCrew(model))); }
public ActionResult Index(FilmCrewModel model) { model.FilmCrew = filmcrewSrv.GetEntries(model); return(View(model)); }