diff options
| author | Michael <[email protected]> | 2017-03-27 18:57:07 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-03-27 18:57:07 -0400 |
| commit | 1dcbadf2eb928c63ce3a968f311f6af6b81d33a4 (patch) | |
| tree | 53491bbdee3e5d77059f810541441ff585c96d0e /Project-Unite/Controllers | |
| parent | 7111f0d5cd4123287d2510d77350d849afe7ea98 (diff) | |
| download | project-unite-1dcbadf2eb928c63ce3a968f311f6af6b81d33a4.tar.gz project-unite-1dcbadf2eb928c63ce3a968f311f6af6b81d33a4.tar.bz2 project-unite-1dcbadf2eb928c63ce3a968f311f6af6b81d33a4.zip | |
Beginning of wiki development
Diffstat (limited to 'Project-Unite/Controllers')
| -rw-r--r-- | Project-Unite/Controllers/WikiControllerController.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Project-Unite/Controllers/WikiControllerController.cs b/Project-Unite/Controllers/WikiControllerController.cs new file mode 100644 index 0000000..1840074 --- /dev/null +++ b/Project-Unite/Controllers/WikiControllerController.cs @@ -0,0 +1,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 == null); + model.Categories = wikicategories; + model.Page = db.WikiPages.FirstOrDefault(x => x.Id == id); + return View(model); + } + } +}
\ No newline at end of file |
