public CategoryVeiwModels Manage(int?id) { Category b = null; if (id != null) { b = Uow.Brand.Get((int)id); } CategoryVeiwModels bVM = new CategoryVeiwModels { Category = b }; Uow.Dispose(); return(bVM); }
public ActionResult Manage(int?id) { Category b = null; ViewBag.Mode = "Create"; if (id != null) { ViewBag.Mode = "Edit"; b = Uow.Brand.Get((int)id); } CategoryVeiwModels bVM = new CategoryVeiwModels { Category = b }; Uow.Dispose(); return(View("Create", bVM)); }