Starts in:
1 DAY
7 HRS
0 MIN
43 SEC
Starts in:
1 D
7 H
0 M
43 S

Activities of "falsharif"

Question

ABP Framework version: v4.2.2 UI type: Blazor DB provider: EF Core / Tiered (MVC) or Identity Server Separated (Angular): no

Hi Team, i currently have multitenant database per tenant implementation for one of my projects. The scenario is as follows:

Its a supermarket management SaaS, i have one host database and around 400 Databases for the tenants. 1 database per supermarket.

Now i am currently creating a customer mobile app in which the customers can order from the supermarkets. So the user registers and that creates a user in the host database, the user logs into the app then chooses a supermarket to place the order . When the user creates an order, this will create a new order in the relavant database. However, some tables have audited entities, how will the userId be carried over to the tenant database ? do i have to create the user again in the relevant database or how do i navigate such a situation ?

I hope you understand the situation, let me know if you have any questions .

  • ABP Framework version: v4.2.2
  • UI type: Blazor
  • DB provider: EF Core /
  • Tiered (MVC) or Identity Server Separated (Angular): no

Hi team, I wanted to ask you about a couple things. I have a blazor app running using the abp template. I am using the default authentication using the OPENID .

what is the advantage of using OPENID vs regular JWT token and attaching to the header ?

how can i change the behaviour of logging out --> going to a page that says i will be redirected ---> going to a page that says "Logged out" ??

at the moment, the redirect after i log out takes me to https://app.promailnet.com/authentication/logged-out , but i want it to go back to the login screen.

is there a way to user regular JWT ?

  • ABP Framework version: v4.2.2
  • UI type: Blazor
  • DB provider: EF Core /
  • Tiered (MVC) or Identity Server Separated (Angular): / no

Hi Team, I want to automatically generate a connectionstring when a new tenant is created , however since i dont have the source code for tenantappserivce, how can i override it ? or what is the solution in my case ?

Cheers, Fathi CTO

Hi team, Iam Trying to create a navigation property for Appuser from my entity so i can include the name of the creator in the front end : i read the documentation and it said something about maping it or ignoring it , but i dont understand what to do exactly

My entity :

{ public class InventoryAdjustmentLog : AuditedEntityWithUser<Guid,AppUser> {

    public InventoryAdjustmentLog()
    {
        
      
    }

  
   public int CurrentStockLevel { get; set; }

   public int AdjustedStockLevel { get; set; }

   public Guid? ReasonId { get; set; }

   public virtual Reason Reason { get; set; }

    public Guid ProductId { get; set; }

   public virtual Product Product { get; set; }


 

}

}

How can i implement this without getting this error :

---- System.InvalidOperationException : The property 'AppUser.ExtraProperties' could not be mapped, because it is of type 'Dictionary&lt;string, object&gt;' which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.

Message: Volo.Abp.AbpInitializationException : An error occurred during ConfigureServices phase of the module Dukkantek.EntityFrameworkCore.DukkantekEntityFrameworkCoreTestModule, Dukkantek.EntityFrameworkCore.Tests, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. ---- System.InvalidOperationException : The property 'AppUser.ExtraProperties' could not be mapped, because it is of type 'Dictionary<string, object>' which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. Stack Trace: AbpApplicationBase.ConfigureServices() AbpApplicationBase.ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationWithExternalServiceProvider.ctor(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationFactory.Create(Type startupModuleType, IServiceCollection services, Action1 optionsAction) AbpApplicationFactory.Create[TStartupModule](IServiceCollection services, Action1 optionsAction) ServiceCollectionApplicationExtensions.AddApplication[TStartupModule](IServiceCollection services, Action1 optionsAction) AbpIntegratedTest1.ctor() DukkantekTestBase1.ctor() DukkantekApplicationTestBase.ctor() InventoryAppServiceTests.ctor(ITestOutputHelper Output) line 23 ----- Inner Stack Trace ----- ModelValidator.ValidatePropertyMapping(IModel model, IDiagnosticsLogger1 logger) ModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) SqliteModelValidator.Validate(IModel model, IDiagnosticsLogger1 logger) ValidatingConvention.ProcessModelFinalized(IConventionModelBuilder modelBuilder, IConventionContext1 context) ImmediateConventionScope.OnModelFinalized(IConventionModelBuilder modelBuilder) ConventionDispatcher.OnModelFinalized(IConventionModelBuilder modelBuilder) Model.FinalizeModel() ModelBuilder.FinalizeModel() ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder) ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder) DbContextServices.CreateModel() DbContextServices.get_Model() <>c.<TryAddCoreServices>b__7_3(IServiceProvider p) CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context) CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) <>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope) ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) ServiceProviderEngineScope.GetService(Type serviceType) ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) DbContext.get_DbContextDependencies() DbContext.get_InternalServiceProvider() IServiceProvider>.get_Instance() InfrastructureExtensions.GetService[TService](IInfrastructure1 accessor) AccessorExtensions.GetService[TService](IInfrastructure1 accessor) DukkantekEntityFrameworkCoreTestModule.CreateDatabaseAndGetConnection() line 56 DukkantekEntityFrameworkCoreTestModule.ConfigureInMemorySqlite(IServiceCollection services) line 29 DukkantekEntityFrameworkCoreTestModule.ConfigureServices(ServiceConfigurationContext context) line 25 AbpApplicationBase.ConfigureServices()

  • ABP Framework version: v3.1.2
  • UI type: Angular
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

HI team, I purchased ABP Commercial and to be honest so far, every step of the way i had an issue. The current issue i am stuck on is when i try to login as a tenant.

So far : i created few Tenants :

then i ran Dbmigrator Project :

successfull

Databases Created :

All good.

try and login as the new Tenant :

Cant login : i get this Invalid Grant error no matter what i do.

Hi team, First of all thanks alot of the amazing work with the ABP Commercial.

I am currently having an issue that seems obvious but i might be doing something wrong, would really appreciate your help as i am stuck.

So when i am trying to run my initial Db migration, i am getting this error :

System.InvalidOperationException: 'The property 'AppUser.ExtraProperties' could not be mapped, because it is of type 'Dictionary<string, object>' which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.'

I followed the guide to extend AppUser Entity :

My AppUser Entity :

namespace Dukkantek.Users {

public class AppUser : FullAuditedAggregateRoot&lt;Guid&gt;, IUser
{
    #region Base properties

    /* These properties are shared with the IdentityUser entity of the Identity module.
     * Do not change these properties through this class. Instead, use Identity module
     * services (like IdentityUserManager) to change them.
     * So, this properties are designed as read only!
     */

    public virtual Guid? TenantId { get; private set; }

    public virtual string UserName { get; private set; }

    public virtual string Name { get; private set; }

    public virtual string Surname { get; private set; }

    public virtual string Email { get; private set; }

    public virtual bool EmailConfirmed { get; private set; }

    public virtual string PhoneNumber { get; private set; }

    public virtual bool PhoneNumberConfirmed { get; private set; }

    #endregion

    

    /* Add your own properties here. Example:
     *
     * public virtual string MyProperty { get; set; }
     * public string MyProperty { get; set; }
     *
     * If you add a property and using the EF Core, remember these;
     *
     * 1. update DukkantekDbContext.OnModelCreating
     * to configure the mapping for your new property
     * 2. Update DukkantekEfCoreEntityExtensionMappings to extend the IdentityUser entity
     * and add your new property to the migration.
     * 3. Use the Add-Migration to add a new database migration.
     * 4. Run the .DbMigrator project (or use the Update-Database command) to apply
     * schema change to the database.
     */


    
    public virtual ICollection&lt;Customer&gt; Customers { get; set; }
    private AppUser()
    {
        
    }
}

Now my AppUser has a one to many relationship with Customer -- > ** public virtual ICollection<Customer> Customers { get; set; } **

** and in my Customer Class:**

public class Customer : AuditedAggregateRoot&lt;Guid&gt;, ISoftDelete
{
 
    [Required]
    [StringLength(50)]
    public string Name { get; set; }

    [StringLength(15)]
    public string Phone { get; set; }

 public Guid UserId { get; set; }
 public virtual AppUser User { get; set; }






My DbContexts OnModelCreating  :  

protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder);

        /* Configure the shared tables (with included modules) here */

        builder.Entity&lt;AppUser&gt;(b =>
        {
            b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser
            b.HasMany(p => p.Customers).WithOne().HasForeignKey(r => r.UserId);
         
            b.ConfigureExtraProperties();
            b.ConfigureByConvention();
            b.ConfigureAbpUser();
          
            /* Configure mappings for your additional properties.
             * Also see the DukkantekEfCoreEntityExtensionMappings class.
             */
        });
        
        

** DukkantekDbContextModelCreatingExtensions**

        builder.Entity&lt;Customer&gt;(b =>
        {
            b.ToTable(DukkantekConsts.DbTablePrefix + "Customers", DukkantekConsts.DbSchema);
            b.ConfigureByConvention(); //auto configure for the base class props

        });
        
        

** DukkantekEfCoreEntityExtensionMappings** public static void Configure() { DukkantekGlobalFeatureConfigurator.Configure(); DukkantekModuleExtensionConfigurator.Configure();

        OneTimeRunner.Run(() =>
        {
          
             * See the documentation for more:
             * https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
             */
       
            ObjectExtensionManager.Instance.MapEfCoreProperty&lt;IdentityUser, ICollection&lt;Customer&gt;>("Customers");
         
         
        });
    }

I feel like this line is probably the issue : ObjectExtensionManager.Instance.MapEfCoreProperty<IdentityUser, ICollection<Customer>>("Customers");

so how do i map IdentityUser to an ICollection of Customers ?? would really appreciate your support on this

Hi team, i am moving from the old aspnet boilerplate to the new one. In the old abp, i had an endpoint that you authenticate with and it gives back a token. The authenticate endpoint in this system doesnt return a JWT token ?

Showing 11 to 17 of 17 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06