Exemplo n.º 1
0
 public ActionResult Getaddrange()
 {
     _context.AddRange(
         new Hero {
         Name = "Captain"
     },
         new Hero {
         Name = "Spiderman"
     },
         new Hero {
         Name = "StarLord"
     },
         new Hero {
         Name = "Gamora"
     },
         new Hero {
         Name = "AntMan"
     },
         new Hero {
         Name = "MissMarvel"
     }
         );
     _context.SaveChanges();
     return(Ok()); //retorna 200
 }