public ActionResult EnrollStudent(int id, string studentName) { string studentID = accountAppServices.GetIDByName(studentName); StudentVM s = studentAppServices.GetStudent(studentID); courseAppService.EnrollStudent(id, s); return(RedirectToAction("Index", "Class")); }
//Call Cient //Server //[HubMethodName("NewMessage")] public void newMessage(string name, string text, int id) { //save db ,.... //string name = "noorulhodaa";//HttpContext.Current.User.Identity.Name) }; CommentVM commentvm = new CommentVM() { Content = text, courseID = id, userID = accountAppServices.GetIDByName(name) }; commentAppServices.SaveNewComment(commentvm); //Boradcast "Server Call Clinet Side MEthod Push Clients.All.notifyNewMessage(name, text, id); }