Exemplo n.º 1
0
        public void UpdateSerieGenre(int id, SerieGenre updatedSerieGenre)
        {
            var serieGenre = SerieGenres.SingleOrDefault(x => x.Id == id);

            if (serieGenre != null)
            {
                serieGenre.Name = updatedSerieGenre.Name;
            }
            this.SaveChanges();
        }
Exemplo n.º 2
0
        public void DeleteSerieGenre(int id)
        {
            var serieGenre = SerieGenres.SingleOrDefault(x => x.Id == id);

            if (serieGenre != null)
            {
                SerieGenres.Remove(serieGenre);
            }
            this.SaveChanges();
        }
Exemplo n.º 3
0
 public SerieGenre InsertSerieGenre(SerieGenre serieGenre)
 {
     SerieGenres.Add(serieGenre);
     this.SaveChanges();
     return(serieGenre);
 }
Exemplo n.º 4
0
        //--------------------//
        // SerieGenre methods //
        //--------------------//

        public SerieGenre GetSerieGenre(int id)
        {
            return(SerieGenres.FirstOrDefault(x => x.Id == id));
        }