public JsonResult CreateFilm([DataSourceRequest] DataSourceRequest request, GridFilmViewModel film)
        {
            if (film != null && ModelState.IsValid)
            {
                var category = this.Data.Categories.GetById(film.CategoryId);

                var filmEntity = new Film()
                {
                    AvailableTickets = film.AvailableTickets,
                    CategoryId = film.CategoryId,
                    Description = film.Description,
                    PricePerTicket = film.PricePerTicket,
                    StartDate = film.StartDate,
                    Title = film.Title,
                };

                this.Data.Films.Add(filmEntity);
                this.Data.SaveChanges();

                film.Id = filmEntity.Id;
                film.CategoryName = category.Name;
            }

            return Json(new[] { film }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
        }
        public JsonResult DeleteFilm([DataSourceRequest] DataSourceRequest request, GridFilmViewModel film)
        {
            if (film != null && ModelState.IsValid)
            {
                this.Data.Films.Delete(film.Id);
                this.Data.SaveChanges();
            }

            return Json(new[] { film }.ToDataSourceResult(request, ModelState), JsonRequestBehavior.AllowGet);
        }