summaryrefslogtreecommitdiff
path: root/Project-Unite/Controllers/BugsController.cs
blob: 34de971e51f691477f5b8a75f98f75749d484c6d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 BugsController : Controller
    {
        // GET: Bugs
        public ActionResult Index()
        {
            var db = new ApplicationDbContext();
            return View(db.BugTags);
        }

        public ActionResult ViewCategory(string id)
        {
            var db = new ApplicationDbContext();
            var cat = db.BugTags.FirstOrDefault(x => x.Id == id);
            if (cat == null)
                return new HttpStatusCodeResult(404);
            return View(cat);
        }
    }
}