Try:
public class CustomLoginModel : LoginModel
{
public CustomLoginModel(IAuthenticationSchemeProvider schemeProvider, IOptions<AbpAccountOptions> accountOptions)
: base(schemeProvider, accountOptions)
{
}
public override async Task<IActionResult> OnPostAsync(string action)
{
try
{
await base.OnPostAsync(action);
}
catch (AbpValidationException e)
{
Alerts.Danger(e.ValidationErrors.First().ErrorMessage);
return Page();
}
return Content("");
}
}
And you need add @(await Component.InvokeAsync<ContentAlertsViewComponent>())
to your custom layout page.
Hi Try :
public class EmailSettingsPageContributor : ISettingPageContributor
{
public async Task<bool> CheckPermissionsAsync(SettingPageCreationContext context)
{
Check.NotNull(context, nameof(context));
var permissionChecker = context.ServiceProvider.GetRequiredService<IPermissionChecker>();
var result = await permissionChecker.IsGrantedAsync(MyAppPermissions.EmailSettings.Edit);
return result;
}
public async Task ConfigureAsync(SettingPageCreationContext context)
{
if (!await CheckPermissionsAsync(context))
{
return;
}
Check.NotNull(context, nameof(context));
var localizer = context.ServiceProvider.GetRequiredService<IStringLocalizer<MyAppResource>>();
context.Groups.Add(new SettingPageGroup("emailsPageGroup", localizer["Settings:Email"], typeof(EmailSettingsViewComponent)));
}
}
I can't reproduce your problem. can you share a simple project to me ? thanks. shiwei.liang@volosoft.ccom
Sorry, I don't understand what is make this as close to ABP. ABP will not restrict you. Maybe you want an elegant solution(Like: automatically query data from other databases when using repository query related data),but this is a big feature.
Hi In fact, I think it has nothing to do with ABP. Yes,you just need rely on id mapping. Since the data is not in the same database, you have to manually maintain data integrity
Hi,
You can directly extend these modules without using ABP suite to install again
Maybe you can try use EF Core provider: https://docs.microsoft.com/en-us/ef/core/providers/cosmos/?tabs=dotnet-core-cli
HI,
Can you share your code? thanks.
See https://support.abp.io/QA/Questions/95/Setting-Definitions-UI-in-MVC-Razor-page
Hi,
I think there is no better way, you need to query multiple times to get navigation properties. I don't think there will be performance problem. Maybe you can cache the navigation properties to get better perfoormance.