public ActionResult InsertDefault(Mensajes model) { //model.ToString(); model.FechaCreacion = DateTime.Now; if (ModelState.IsValid) { //Insert into Message table using (var context = new ApplicationDbContext()) { context.Mensajes.Add(model); context.SaveChanges(); } } //Once the record is inserted , then notify all the subscribers (Clients) ChatHub.NotifyCurrentEmployeeInformationToAllClients(); return(RedirectToAction("ChatDefault")); }