public void Delete(Movie movie) { if (this.movies.ContainsKey(movie.ID)) { this.movies.Remove(movie.ID); } }
// Delete protected void DeleteButton_Click(object sender, EventArgs e) { IApplicationContext ctx = ContextRegistry.GetContext(); IMovieService movieService = ctx.GetObject("MovieService") as IMovieService; Movie movie = new Movie( Int32.Parse(this.DeleteIdTextBox.Text), "NotUsed"); movieService.Delete(movie); UpdateCacheContent(); }