Example project has been updated: https://github.com/realLiangshiwei/Qa727
Can you provide a simaple project to reproduce the problem?
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):
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