Activities of "liangshiwei"

Can you provide a simaple project to reproduce the problem?

Answer

Hi,

You should return Entity instead of Dto and always return IQueryable as a best practice, see: https://docs.microsoft.com/en-us/odata/webapi/first-odata-api#update-the-controller

Example :

private readonly IDimAssetClassRepository _dimAssetClassRepository;

public DimAssetClassController(IDimAssetClassRepository dimAssetClassRepository)
{
    _dimAssetClassRepository = dimAssetClassRepository;
}

[EnableQuery]
public IQueryable<DimAssetClass> Get()
{
    return _dimAssetClassRepository.GetDbSet().AsQueryable();
}

Replace your ConfigureOdata method with the following code:

private void ConfigureOdata(ServiceConfigurationContext context)
{
    context.Services.AddOData();
    context.Services.AddAssemblyOf<MetadataController>();

    Configure<MvcOptions>(options =>
    {
        foreach (var outputFormatter in options.OutputFormatters.OfType<OutputFormatter>().Where(x => x.SupportedMediaTypes.Count == 0))
        {
            outputFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/prs.odatatestxx-odata"));
        }

        foreach (var inputFormatter in options.InputFormatters.OfType<InputFormatter>().Where(x => x.SupportedMediaTypes.Count == 0))
        {
            inputFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/prs.odatatestxx-odata"));
        }
    });
}

Hi,

This is a big question, it takes a lot of effort to do this.

Here are some of my suggestions(just an idea):

  1. JWT cannot be changed, it is designed to be immutable.
  2. When you change the tenant, the current user must also change
  3. You can provide a Http API and use code to get Token.
  4. Replace token in local storage in angular code.
  5. Refresh the page to get the application configuration

Hi,

See https://github.com/abpframework/abp/pull/7333, You can use the ConfigureAll method in v4.3

Hi,

May be you can get the new token on the server side and replace the token in the browser local storage.

Hi,

Yes, the JsTreeScriptContributor depends on jquery. try:

options
    .ScriptBundles
    .Configure(typeof(Volo.Abp.Identity.Web.Pages.Identity.Users.IndexModel).FullName, bundle =>
    {

        bundle.AddContributors(typeof(RemoveJqueryScriptContributor));
    });

options
    .ScriptBundles
    .Configure(typeof(Volo.Abp.Identity.Web.Pages.Identity.OrganizationUnits.IndexModel).FullName, bundle =>
    {

        bundle.AddContributors(typeof(RemoveJqueryScriptContributor));
    });

Hi,

Unfortunately, it is currently not possible. The tenant must be determined before logging in.

Hi,

ABP allows you to switch current tenants within the scope: https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant.

See https://docs.abp.io/en/abp/latest/Emailing#nullemailsender

Answer

Hi,

The core code of the migration service is in the domain layer: <YourProjectName>DbMigrationService.

You can inject and use migration services in your code

Showing 6001 to 6010 of 6692 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20