Exemplo n.º 1
0
        public async Task <bool> AddStudent(StudentCreationViewModel student)
        {
            bool ans = false;
            var  std = StudentCreationViewModel.ToStudent(student);

            ans = await _studentRepository.AddStudent(std);

            return(ans);
        }
Exemplo n.º 2
0
        private void TestStudentRepo()
        {
            var student = new Student
            {
                Id        = 0, //New Record
                StudentId = 3,
                Name      = "Deepthi"
            };

            studentRepo.AddStudent(student);
            studentRepo.ChangeToGSDStudent(student);
        }
Exemplo n.º 3
0
 public IActionResult Create([Bind("Id,Name,Course,Address")] Student student)
 {
     studentService.AddStudent(student);
     return(RedirectToAction("Index"));
 }