public IActionResult CreatePropertyValue(PropertyValue values) { if (!ModelState.IsValid) { ViewBag.names = propertyService.GetPropertyNames(); return(View(values)); } bool res = propertyService.AddPropertyValue(values); TempData["res"] = res ? "success" : "faild"; return(RedirectToAction(nameof(PropertyValueList))); }