/// <summary> /// Adds a new TV show on the database. /// </summary> /// <param name="show">The new TV show.</param> public void Create(TVShow show) { _context.TelevisionShows.Add(show); _context.SaveChanges(); }
/// <summary> /// Deletes a TV show on the database. /// </summary> /// <param name="show">The TV show to be deleted.</param> public void Delete(TVShow show) { _context.TelevisionShows.Remove(show); _context.SaveChanges(); }
/// <summary> /// Updates an exisitng TV show on the database /// </summary> /// <param name="show">The TV show to be updated.</param> public void Update(TVShow show) { _context.Entry<TVShow>(show).State = EntityState.Modified; _context.SaveChanges(); }