public void AddFilm(Film film) { using (IFilmDataGateway dataGateway = dataService.OpenDataGateway()) { dataGateway.AddFilm(film); OnFilmAdded(new FilmEventArgs(film)); } }
public void AddFilm(Film film) { bool added = false; using (IFilmDataGateway filmDataGateway = filmDataService.OpenDataGateway()) { filmDataGateway.AddFilm(film); } if (added) { OnFilmAdded(new FilmEventArgs(film)); } }