public IActionResult Create(TenantEditModel tenant) { if (ModelState.IsValid) { int id = _bus.Send(new TenantEditCommand { Tenant = tenant }); return RedirectToAction("Index"); } return View(tenant); }
public IActionResult Edit(TenantEditModel tenant) { if (ModelState.IsValid) { int id = _bus.Send(new TenantEditCommand { Tenant = tenant }); return RedirectToAction("Details", new { id = id, area = "Admin" }); } return View("Edit", tenant); }