public Genre Create(Genre genre) { if (genre.Video != null) { _context.Entry(genre.Video).State = EntityState.Unchanged; } _context.Genres.Add(genre); return(genre); }
public Rental Create(Rental Ren) { if (Ren.Video != null) { _context.Entry(Ren.Video).State = EntityState.Unchanged; } _context.Rentals.Add(Ren); return(Ren); }