public ConceptTwo(Storage _storage) : base(_storage) { this.prototypeManager = new PrototypeManager(); prototypeManager["movie"] = new Movie(); prototypeManager["actor"] = new Actor(); }
public void assignMovieToActor(Actor actor, Movie movie) { if (actor != null && movie != null) { actor.Movies.Add(movie); movie.Actors.Add(actor); } }
/* Movie */ public Movie saveNewMovie(string title, int year, string text) { Movie newMovie = new Movie(); newMovie.Title = title; newMovie.Year = year; newMovie.Text = text; //Id wird automatisch beim Insert erstellt return storage.Movies.Insert(newMovie); // insert }
private void UpdateMovie(Movie movie) { if (movie != null) { tbxTitle.Text = movie.Title; tbxYear.Text = movie.Year.ToString(); tbxDescriptionMovie.Text = movie.Text; } }
public void deleteMovie(Movie movie) { if (movie != null) storage.Movies.Delete(movie); }