Step 1: create the MVC project with Visual Studio.
Step 2: create the SQL Server database.
Step 3: create the controller.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Mvc.Ajax; using FootballStatsMvc.Models; // add reference to our model // // GET: /FootballStats/ public ActionResult Index() { var statsDB = new FootballStatsDataContext(); var players = statsDB.Players; return View(players); } |
Step 4: create the model.
Step 5: create the view.
Step 6: add the new tab to the master page.
Source: FootballStatsMvc.zip
No comments:
Post a Comment