blob: b49a39e36ff0c873ed05d5c4cc34e479017905b7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Project_Unite.Models;
namespace Project_Unite.Controllers
{
public class WikiController : Controller
{
public ActionResult Index(string id = "")
{
var db = new ApplicationDbContext();
var model = new WikiViewModel();
var wikicategories = db.WikiCategories.Where(x => x.Parent == "none");
model.Categories = wikicategories;
model.Page = db.WikiPages.FirstOrDefault(x => x.Id == id);
return View(model);
}
}
}
|