public ActionResult AddCategory(CategoryDal obj) { CategoryDal objcat = new CategoryDal(); objcat.AddCategory(obj.Categoryname); return(Json(obj, JsonRequestBehavior.AllowGet)); }
public ActionResult Create(category cat) { try { CategoryDal ct = new CategoryDal(); ct.AddCategory(cat); return(RedirectToAction("Index")); } catch (Exception ex) { return(View()); } }
/// <summary> /// 新增Category /// </summary> /// <param name="Category"></param> /// <returns></returns> public static async Task <Tuhu.Provisioning.DataAccess.Entity.Discovery.Category> AddCategory(Tuhu.Provisioning.DataAccess.Entity.Discovery.Category Category) { return(await CategoryDal.AddCategory(Category)); }