public IActionResult CreateRootCa(Guid?keyPairSysid)
        {
            RootCaCreateViewModel model = new RootCaCreateViewModel()
            {
                KeyPairSysid = keyPairSysid
            };

            return(View(model));
        }
        public async Task <IActionResult> CreateRootCa(
            [Bind] RootCaCreateViewModel model,
            [FromServices] RootAuthorityAppService rootAuthorityAppService,
            [FromServices] TenantContext agileLabsDbContext)
        {
            if (ModelState.IsValid)
            {
                await rootAuthorityAppService.CreateRootCertificationAuthority(model.KeyPairSysid, model.Name);

                await _adminDbContext.SaveChangesAsync();

                await agileLabsDbContext.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(model));
        }