public async Task <IActionResult> Post([FromBody] LocalDTO local) { //await Service.Insert(local); //return Ok(true); if (!ModelState.IsValid) { throw new Exception("Model is not Valid"); } await Service.Insert(local); return(Ok(true)); }
public ActionResult Create(Local loc) { bool rpta = localservice.Insert(loc); if (rpta) { return(RedirectToAction("Index")); } return(View()); }