hi
I am encountering an internal server error.
Can you share the error logs of the 500?
The access_token you passed to API is not gotten from ABP. I think API doesn't recognize it.
hi
I need to implement a new datafilter called ICompany which will hold a guid for the current company a user has chosen. This filter needs to be used across several abp modules each with their own DBContext. What's the best way to implement this given my use case
public interface ICompany
{
Guid CompanyId { get; set; }
}
ICompany
interface.ICompany
in some entities of some modules.StructureCloudDbContext
.(https://abp.io/docs/latest/framework/infrastructure/data-filtering#entityframework-core)how would I go about setting the CompanyId for this filter when a user changes the current company guid they are wanting to filter the data with.
How do your users change their CompanyId
?
Where do you store the CompanyId
? In CurrentUserClaims
?
This article stores the OrganizationId
in IDistributedCache
and changes it in ASPNET Core middleware
hi
Your StructureCloudDbContext
has already replaced some modules.
You can add your custom data filter in StructureCloudDbContext.
https://abp.io/docs/latest/framework/infrastructure/data-filtering#entityframework-core
hi
Can you share your app DbContext
class?
This is the feature in EF Core, which has nothing to do with front-end UI(Blazor-WASM)
I want to add more properties to the ICurrentUser at login time and use for every service. How can I do it?
Can you create a new question?
Thanks.
hi
Because our developers are working in a no-internet environment so we can not use the abp cli
ABP CLI generate-proxy
command doesn't need the internet.
hi
If you have two DbContext
in the unit test, the code is no problem
new SurveyDbContext(surveyDbOptions).GetService<IRelationalDatabaseCreator>().CreateTables();
new ShoutMigrationsDbContext(shoutMigrationsDbOptions).GetService<IRelationalDatabaseCreator>().CreateTables();
https://github.com/abpframework/abp/blob/dev/modules/openiddict/test/Volo.Abp.OpenIddict.EntityFrameworkCore.Tests/Volo/Abp/OpenIddict/EntityFrameworkCore/OpenIddictEntityFrameworkCoreTestModule.cs#L38-L56
ok, I will check it asap.