public void TestInitialize() { var persona = new Persona() { Nombre = "Zack", Apellido = "Snyder", CodigoIMDB = "nm0811583" }; Context.Personas.Add(persona); var pelicula = new Pelicula() { Nombre = "Batman v Superman: Dawn of Justice", CodigoIMDB = "tt2975590", Resumen = "Fearing that the actions of Superman are left unchecked, Batman takes on the Man of Steel, while the world wrestles with what kind of a hero it really needs.", Director = persona }; Context.Peliculas.Add(pelicula); Context.SaveChanges(); }
public PeliculaWrapperView Agregar(Pelicula pelicula) { Context.Peliculas.Add(pelicula); Context.SaveChanges(); return(new PeliculaWrapperView(pelicula)); }
public void Agregar(Persona persona) { Context.Personas.Add(persona); Context.SaveChanges(); }
public void Agregar(Pelicula pelicula) { Context.Peliculas.Add(pelicula); Context.SaveChanges(); }