BExIS.Web.Shell.Areas.SAM.Controllers.TenantsController.Unregister C# (CSharp) Method

Unregister() public method

If the tenat is inactive and is not default, deletes it and returns to the list action with updated information reports any problem, otherwise
1. It is not allowed to delete an ACTIVE tenant. If needed, the chosen tenant must be inctivated first. 2. It is not allowed to delete the DEFAULT tenant. If needed, another tenant must be set as the default, before deleting the chosen one. 3.There MUST at least one active tenant remaining in the list after this operation.
public Unregister ( string id ) : System.Web.Mvc.ActionResult
id string
return System.Web.Mvc.ActionResult
        public ActionResult Unregister(string id)
        {
            ITenantRegistrar tenantRegistrar = MultiTenantFactory.GetTenantRegistrar();
            tenantRegistrar.Unregister(id);
            return View();
        }