Open Closed

An unhandled exception occurred while processing the request. #10836


0
sumitshah created
  • What is your product version- AspNetZero 11.0.0
  • What is your product type (Angular or MVC) - Angular
  • What is product framework type (.net framework or .net core) - .net core 6.0

We have migrated code from .net core 2.2 to .net core 6.0 . Tried to build and run backend(.net) application, getting following error in browser.

SqlException: Invalid column name 'ExceptionMessage'. Microsoft.Data.SqlClient.SqlCommand+<>c.<ExecuteDbDataReaderAsync>b__188_0(Task<SqlDataReader> result)

DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.ExecuteAsync(IRelationalConnection connection, CancellationToken cancellationToken)


3 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @sumitshah

    You need to add a migration to your project and update the database first. Then, it should be fine.

  • 0
    sumitshah created

    Hello @ismcagdas , Thanks for help. Could you please guide us a specific steps to add a migration for project and how can I proceed to update a database?

  • 0
    ismcagdas created
    Support Team

    Hi @sumitshah

    You can run "dotnet ef migrations add Upgraded_To_ABP_7_0" (or you can use another migration name) command in the root directory of EntityFramework project. This command will create the migration for you.

    Then, you can either run "dotnet ef database update" command or you can run the Migrator project in your solution to update the database.