コード例 #1
0
 public void AddFilm(Film film)
 {
     using (IFilmDataGateway dataGateway = dataService.OpenDataGateway())
     {
         dataGateway.AddFilm(film);
         OnFilmAdded(new FilmEventArgs(film));
     }
 }
コード例 #2
0
        public void AddFilm(Film film)
        {
            bool added = false;

            using (IFilmDataGateway filmDataGateway = filmDataService.OpenDataGateway())
            {
                filmDataGateway.AddFilm(film);
            }

            if (added)
            {
                OnFilmAdded(new FilmEventArgs(film));
            }
        }