コード例 #1
0
        public void AddGrade(Grades entityToAdd)
        {
            IGradesRepository repo = new GradesRepository(getEntities());

            Entities.Grades entityToAdd2 = Mapper.Map <Grades, Entities.Grades>(entityToAdd);
            repo.Add(entityToAdd2);
        }
コード例 #2
0
        public ActionResult Grade(Grade gradeVM)
        {
            try
            {
                gRepo.Add(gradeVM, User.Identity.GetUserId());

                return(RedirectToAction("UngradedAssignments", "Teachers"));
            }
            catch
            {
                return(View());
            }
        }