public ActionResult MassgeInserting(string massage, int custID) { NewsModel newModel = new NewsModel(); newModel.CUSTOMER = new CustomerModel(); newModel.CUSTOMER.CUST_NO = custID; newModel.NEWS_MSG = massage; newModel.ALERT_STATUS = "new"; Database db = new Database(); NewsDAO newDAO = new NewsDAO(db); newDAO.Add(newModel); db.Close(); return(RedirectToAction("CustomerMassage", "SysMassage", new { custID = custID })); }