public ActionResult Add(string name,int age,string photo)//里面的名字 必须和页面中的标签的名称必须一样{User u = new User();u.Name = name;u.Age = age;u.Photo = photo;db.User.Add(u);db.SaveChanges();return RedirectToAction("index");}
posted on 2021-09-22 23:07 一杯阔乐 阅读(11) 评论(0) 收藏 举报
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3