Exemple #1
0
        public async Task <IActionResult> Edit(string id, [Bind("AppTenantId,Name,Title,Hostname,ThemeName,ThemeId,ConnectionString,Folder,RequireSSL,OwnerUserName,TrialEndDate,CreateDate")] AppTenant appTenant)
        {
            if (id != appTenant.AppTenantId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(appTenant);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AppTenantExists(appTenant.AppTenantId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ThemeId"] = new SelectList(_context.Themes, "Id", "CreatedBy", appTenant.ThemeId);
            return(View(appTenant));
        }