Beispiel #1
0
 public int BrandId(string value)
 {
     _brand.AddBrand(new Brand()
     {
         BrandName = value
     });
     return(_brand.GetId(value));
 }
Beispiel #2
0
 public IActionResult Index(Brand brand)
 {
     if (!ModelState.IsValid || brand.BrandName == null)
     {
         return(View(brand));
     }
     if (_brandHandler.AddBrand(brand))
     {
         return(RedirectToAction("Index", "Product"));
     }
     return(View(brand));
 }