Exemplo n.º 1
0
        public ActionResult Create(Issue issue, Issue issue1)
        {
            if (!ModelState.IsValid)
            {
                return View("New", issue);
            }
            _repository.Create(new Entities.Issue { Title = issue.Title, Description = issue.Description });

            return RedirectToAction("Index");
        }
Exemplo n.º 2
0
 public ActionResult GetAsJson()
 {
     var issues = _repository.Entities.ToList();
     List<Issue> modelIssues = new List<Issue>();
     foreach (var issue in issues)
     {
         var i = new Issue
         {
             Title = issue.Title
         };
         modelIssues.Add(i);
     }
     return Json(modelIssues, JsonRequestBehavior.AllowGet);
 }
Exemplo n.º 3
0
        public ActionResult Index()
        {
            var issues = _repository.Entities.ToList();
            List<Issue> modelIssues = new List<Issue>();
            foreach (var issue in issues)
            {
                var i = new Issue
                {
                    Title = issue.Title
                };
                modelIssues.Add(i);
            }

            return View(modelIssues);
        }