public async Task <IActionResult> setRegStudent(RegisterResource register) { var res = await ITeacher.getStudent(register.id); res.IsReg = register.isReg; int x = updateDetails(); #warning Add track on who registered student TeacherController=>serRegStudent() //============notification============= var noti = new StudentNotification(); noti.StudentId = register.id; noti.OtherId = register.otherId; noti.OtherType = "T"; noti.Viwed = false; noti.NotiDate = DateTime.Now.ToString(); if (register.isReg == true) { noti.NotiMessage = "You have been registered"; } else { noti.NotiMessage = "You have been un-registered"; } ITeacher.AdderAsync(noti); ITeacher.Saver(); return(Ok(x)); }
public int AdderAsync(StudentNotification ob) { db.AddAsync(ob); return(1); }