Beispiel #1
0
 public ActionResult Create(GradeViewModel model)
 {
     try
     {
         // TODO: Add insert logic here
         GradeService.Create(model);
         //list.Add(model);
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Beispiel #2
0
        public ActionResult <GradeItem> Create(GradeItem item)
        {
            _gradeService.Create(item);

            return(CreatedAtRoute("GetGrade", new { id = item.Id }, item));
        }