Beispiel #1
0
        public IActionResult Create(TenantEditModel tenant)
        {
            if (ModelState.IsValid)
            {
                int id = _bus.Send(new TenantEditCommand { Tenant = tenant });
                return RedirectToAction("Index");
            }

            return View(tenant);
        }
Beispiel #2
0
        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);
        }