public void AddGrade(Grades entityToAdd) { IGradesRepository repo = new GradesRepository(getEntities()); Entities.Grades entityToAdd2 = Mapper.Map <Grades, Entities.Grades>(entityToAdd); repo.Add(entityToAdd2); }
public ActionResult Grade(Grade gradeVM) { try { gRepo.Add(gradeVM, User.Identity.GetUserId()); return(RedirectToAction("UngradedAssignments", "Teachers")); } catch { return(View()); } }