Activities of "jhsanc"

I have this problem with ExtraProperties also but in AppUser

I have the same problem.

  • ABP Framework version: v4.3.0
  • UI type: Blazor
  • DB provider: EF Core
    • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
System.InvalidOperationException: The entity type 'IdentityUserLogin' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.ValidateNonNullPrimaryKeys(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.SqlServer.Internal.SqlServerModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.ValidatingConvention.ProcessModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ImmediateConventionScope.OnModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Internal.Model.FinalizeModel()
   at Microsoft.EntityFrameworkCore.ModelBuilder.FinalizeModel()
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
   at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
   at ResolveService(ILEmitResolverBuilderRuntimeContext , ServiceProviderEngineScope )
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.get_ChangeTracker()
   at Volo.Abp.EntityFrameworkCore.AbpDbContext`1.Initialize(AbpEfCoreDbContextInitializationContext initializationContext)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString)
  • Steps to reproduce the issue: I need do a relation between my table to AbpUser table and select user when I'm creating a person. If I add the next code:
    builder.Entity<Person>(b =>
    {
        b.ToTable(SharedDbProperties.DbTablePrefix + "People", SharedDbProperties.DbSchema);
        b.ConfigureByConvention();
        b.Property(x => x.TenantId).HasColumnName(nameof(Person.TenantId));
        b.Property(x => x.Name).HasColumnName(nameof(Person.Name)).IsRequired().HasMaxLength(PersonConsts.NameMaxLength);
        b.HasOne<Volo.Abp.Identity.IdentityUser>().WithMany().HasForeignKey(x => x.AbpUserId);

In my database founds good create the relation, but when I get data from any table, I got the issue message explained above. I can't use AppUser of the main application because this is a Blazor module and doesn't exist AppUser in the module only in the main application.

https://support.abp.io/QA/Questions/1233/ABP-Suite-does-not-generate-Blazor-UI-for-a-module

Thank you it's clear not supported yet.

Yes, it is planned to be supported at version 4.4 (https://support.abp.io/QA/Questions/1233/ABP-Suite-does-not-generate-Blazor-UI-for-a-module#answer-b698ced4-ecd2-3b97-2f66-39fc2aaf7e95)

Thank you, then wait.

https://support.abp.io/QA/Questions/1233/ABP-Suite-does-not-generate-Blazor-UI-for-a-module

Thank you it's clear not supported yet.

  • ABP Framework version: v4.3.0

  • UI type: Blazor

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Steps to reproduce the issue:

  • When I try to generate the code with abp suite in a module don't create the user interface for blazor inside the module.

  1. Create blazor webassembly application with ABP Suite.
  2. Add Blazor UI module to created application.
  3. Open created module with ABP Suite.
  4. Generate new entity with "Create user interface" option checked.
  5. Generated code don't have the user interface in blazor module, founds good in core application.

Thank you,

Hi,

I make an example for you: https://github.com/realLiangshiwei/Qa1129.

Qa module and identity module are two databases

  "ConnectionStrings": { 
    "Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=Qa_Main;Trusted_Connection=True", 
    "Qa": "Server=(LocalDb)\\MSSQLLocalDB;Database=Qa_Module;Trusted_Connection=True" 
  } 

This example it's great, thank you so much.

Hi,

Usually we should not use the entity of another module in a module, it will blur the boundaries of your module.

A good module should focus on its own entities, but sometimes the module needs to read the data of another module. We have the following way:

  • Use domain events https://docs.abp.io/en/abp/latest/Distributed-Event-Bus
  • Use dynamic HTTI API proxy (reference .HttpApi.Client module) https://docs.abp.io/en/abp/latest/API/Dynamic-CSharp-API-Clients
  • Use repository(reference .domain module), In this way, you can read the database directly.

If you really need to share entities between modules, you can define a Entity.Shared project and other modules reference this project. that's ok.

Can you explain me more this "Use repository(reference .domain module), In this way, you can read the database directly". Only add the reference of the project to the project app.

In the generated code of abp framework in DbContext say this: * It does not include entities of the used modules, because each module has already * its own DbContext class. If you want to share some database tables with the used modules, * just create a structure like done for AppUser. * * Don't use this DbContext for database migrations since it does not contain tables of the * used modules (as explained above). See SportsMigrationsDbContext for migrations. But I need know if this is a good practice.

Thank you,

Sorry this not it's a solution from question. I'm going to reformulate my question: For instance for BookStore-Modular: https://github.com/abpframework/abp-samples/tree/master/BookStore-Modular for example. How is the most efficient way to "share" part of "whole database schema" across multiple modules (so that some tables are not defined on application-level but only on module level)?

If application would have the same architecture as BookStore-Modular and part od database would be using the same tables in 4 modules (and other parts of the application - modules don't use these tables at all).

Maybe module, which "holds" tables for modules and each module that should use these tables should reference this "database module"?

I need a shared module which defines the shared entities

Hello, I need a guide to develop an blazor ui application module, and how I can add this module to my existing monolithic blazor application. I need also know how I can do relations between my principal monolithic application entities to my blazor ui module in other solution. I already read the documents of modules, and plugins but I need more details, and if you have an getting started of this was great.

Thank you,

Johan

  • ABP Commertial Team version: v4.3.0-rc.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:
Showing 81 to 90 of 90 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11