public async Task <IActionResult> UpdateCategory(int id, string name) { var result = await goodsBs.ListGoodCategory(); var cate = (result.Data as List <GoodCategory>).FirstOrDefault(x => x.Id == id); cate.Name = name; var nReesult = await goodsBs.UpdateCategory(cate); return(Json(nReesult)); }
public async Task <IActionResult> GetListGoodCategory() { var result = await goodsBs.ListGoodCategory(); return(Json(result)); }