/// <summary> /// Add /// </summary> /// <param name="m"></param> /// <returns></returns> public virtual JsonResult Add([FromBody] TClass m) { var res = _bll.Add(m); return(Json(res)); }
public ActionResult Add(NewsInfo newsInfo) { newsInfo.RegTime = DateTime.Now; newsInfoBll.Add(newsInfo);//添加数据 return(Redirect(Url.Action("Index"))); }
public T Post(T item) { bool result = dbSet.Add(item); return(result ? item : null); }