public IActionResult Add(Brand brand) { var result = _brandManager.Add(brand); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public ActionResult Create(Brand brand) { var brandtable = brandManager.GetSome(5); ViewBag.brandlist = brandtable.ToList(); if (brandManager.Add(brand)) { ModelState.Clear(); return(RedirectToAction("Create", new { success = "true" })); } var list = generalCategoryManager.GetAll(); ViewBag.orglist = list.ToList(); return(View(brand)); }