Hi,
I have a table that named Organization which inherited from OrganizationUnit that uses by ABP.
public sealed class Organization : OrganizationUnit
{
//some codes..
}
And i had overwrite the table name by adding following configuration below :
namespace Kuys.EntityFrameworkCore.EntityFrameworkCore.Configurations.Organization.Organizations
{
public class OrganizationUnitConfiguration : IEntityTypeConfiguration<OrganizationUnit>
{
public void Configure(EntityTypeBuilder<OrganizationUnit> builder)
{
builder.ToTable("Organizations", SchemaNames.Organization);
}
}
}
However, since when i upgrade my abp version to latest (core 5), i'm getting the following error messages on update-database operation.
System.InvalidOperationException: To change the IDENTITY property of a column, the column needs to be dropped and recreated.
at Microsoft.EntityFrameworkCore.Migrations.SqlServerMigrationsSqlGenerator.Generate(AlterColumnOperation operation, IModel model, MigrationCommandListBuilder builder)
at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.<>c.<.cctor>b__83_4(MigrationsSqlGenerator g, MigrationOperation o, IModel m, MigrationCommandListBuilder b)
at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(MigrationOperation operation, IModel model, MigrationCommandListBuilder builder)
at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(IReadOnlyList`1 operations, IModel model, MigrationsSqlGenerationOptions options)
at Microsoft.EntityFrameworkCore.Migrations.SqlServerMigrationsSqlGenerator.Generate(IReadOnlyList`1 operations, IModel model, MigrationsSqlGenerationOptions options)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.GenerateUpSql(Migration migration, MigrationsSqlGenerationOptions options)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.UpdateDatabase(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabaseImpl(String targetMigration, String connectionString, String contextType)
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.UpdateDatabase.<>c_DisplayClass0_0.<.ctor>b_0()
at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
To change the IDENTITY property of a column, the column needs to be dropped and recreated.
Do you have any suggestion to solve this problem?
Hi There,
I'm writing Select queries (not insert, update or delete) for some reports. These queries are creating by joining maybe 6-7 tables. And i'm creating repositories on EntityFrameworkCore layer for these kind of queries.
Then, I have to return my DTO for these kind of select queries. I was just wondering, should I define these kind of DTOs on the Core.Shared layer?
If so, do I need to redefine the same DTO on the Application.Shared layer, to convert it to api? (Because, there is no related reference on that layer. -it doesn't have to be by the way, of course. )
What is the best practice for these type of situations?
And also, i add all my select queries to the repository folder on the EntityFrameworkCore layer. Let's say, there is a entity that named Person. I create PersonRepository on EntityFrameworkCore layer and defined it's interface on the core layer. Do you think that there is a mistake on this?
In general, can you explain the best practice method that you will propose for such complex queries with an example, if possible?
thanks maliming by the way footer bar not fix bottom why it could be?
Hello, Where can i find metronic v7 source codes?
Yes i guess elsa and my project use diffirent ef core version so how we can use third party packages if them use diffirent ef core version. For example Hangfire works but i guess its not use ef core
Hi mailming, i guess microsoft fixed problem
Thank you, will you add that next version?
Hello,
I have problem about navgation extend
For example i have two menu item
new AppMenuItem('Event_Pools', 'Pages.Main.Event.Management.EventPool', 'flaticon2-next', '/app/main/event/management/event-pool/list', ['/app/main/event/management/event-pool/person/list/{event-pool-id}']),
new AppMenuItem('Event_Pools', 'Pages.Main.Event.Management.EventPool', 'flaticon2-next', '/app/main/event/management/event-pool/list', ['/app/main/event/management/event-pool/person/list/{event-pool-id}'], [], null, { eventType: 'Meeting' })
Second menu item have query parameter but when i click menu items, navigation extend both menu items