Advertisement
Guest User

PokemonController .cs

a guest
Mar 19th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Entity;
  4. using System.Linq;
  5. using System.Web;
  6. using System.Web.Mvc;
  7. using WebApplication1.Models;
  8.  
  9. namespace WebApplication1.Controllers
  10. {
  11. public class PokemonController : Controller
  12. {
  13. // GET: Pokemon
  14. public ActionResult Index()
  15. {
  16.  
  17. PokemonContext px = new PokemonContext();
  18. Pokemon Mypokemon = new Pokemon();
  19.  
  20. Mypokemon = px.Pokemon.First(pke => pke.Name == "Pikachu");
  21.  
  22.  
  23.  
  24. return View(Mypokemon);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement