public ActionResult Transaction(MessageModel model) { RequestResult <MessageModel> result = new RequestResult <MessageModel>() { Status = EGullf.Services.Models.Utils.Status.Success }; MessageServices services = new MessageServices(); result.Data = services.InsUpd(model).Data; if (result.Status == Status.Success) { var context = GlobalHost.ConnectionManager.GetHubContext <AlertHub>(); context.Clients.Group(string.Format("P{0}", result.Data.To)) .newMessage(result.Data); } return(Json(result)); }