public IActionResult OnPostAsync()
 {
     if (!ModelState.IsValid)
     {
         return(Page());
     }
     StudentStore.AddStudent(Student);
     return(RedirectToPage("./Index"));
 }
Exemple #2
0
 public void OnGet(Guid id)
 {
     Student = StudentStore.GetStudenById(id);
 }
Exemple #3
0
 public EditModel(StudentStore studentStore)
 {
     StudentStore = studentStore;
 }
Exemple #4
0
        public IActionResult OnPostDelete(Guid id)
        {
            StudentStore.DeleteStudent(id);

            return(RedirectToPage());
        }
Exemple #5
0
 public IndexModel(StudentStore studentStore)
 {
     StudentStore = studentStore;
     Students     = StudentStore.GetStudents();
 }
Exemple #6
0
 public StudentsController(StudentStore studentStore)
 {
     StudentStore = studentStore;
 }
 public AddModel(StudentStore studentStore)
 {
     StudentStore = studentStore;
 }
Exemple #8
0
 public indexModel(StudentStore studentsStore)
 {
     StudentStore = studentsStore;
     StudentsList = studentsStore.GetStudents();
 }
 public IndexModel(StudentStore studentStore, ComputerStore computerStore)
 {
     StudentStore = studentStore;
     Students     = StudentStore.GetStudents();
 }
 public void OnGet(Guid id) //aqui recibe el que envio en route
 {
     Student = StudentStore.GetStudentById(id);
 }