@using Microsoft.AspNetCore.Hosting @using Microsoft.AspNetCore.Mvc.ViewEngines @using Remotely.Server.Services @using Remotely.Shared.Models @inject IApplicationConfig AppConfig @inject IWebHostEnvironment Environment @inject ICompositeViewEngine Engine @inject IDataService DataService @{ var organizationName = "Remotely"; var user = DataService.GetUserByNameWithOrg(User?.Identity?.Name); if (user is null) { var defaultOrg = await DataService.GetDefaultOrganization(); if (!string.IsNullOrWhiteSpace(defaultOrg?.OrganizationName)) { organizationName = defaultOrg.OrganizationName; } } else if (!string.IsNullOrWhiteSpace(user.Organization?.OrganizationName)) { organizationName = user.Organization.OrganizationName; } }