public IActionResult AddBrand([FromForm] NewBrand newBrand) { var user = User.Claims.Where(u => u.Type == ClaimTypes.UserData).FirstOrDefault().Value; var userId = new Guid(user); var result = _carService.AddBrand(newBrand.Name, userId); return(Ok(result)); }
private void AddBrand() { NewBrand newBrand = new NewBrand(); newBrand.Owner = this; bool?result = newBrand.ShowDialog(); CheckResult(result); }