public ActionResult AddCpu() { var cp = new CpuRepo(new CpuMssql()); var cvm = new CpuViewModel((Computer)Session["CurrentBuild"], cp.GetAll()); return(View(cvm)); }
// GET: Part public ActionResult Cpu(int computerId) { var cr = new ComputerRepo(new ComputerMssql()); var cp = new CpuRepo(new CpuMssql()); var cvm = new CpuViewModel(cr.GetById(computerId), cp.GetAll()); return(View(cvm)); }