Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

EF Database migration - from class in .Core projekt - with Add-Migration ... the generated migration file doesn't contain code for the new Entity generation #11276


User avatar
0
olmy90 created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version?
  • What is your product type (Angular or MVC)?
  • What is product framework type (.net framework or .net core)?

If issue related with ABP Framework

  • What is ABP Framework version?

If issue is about UI

Hi,

I've added new Entity described here in .Core projekt - my code below. like https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Developing-Step-By-Step-Angular-Creating-Person-Entity

Now I try step 2 "Database Migrations for " - https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Developing-Step-By-Step-Angular-Database-Migrations-Person-Entity but the migration class is not generated correctly - it doesn't contain the code for generation of the new entity. Any ideas?

My new Entity namespace XYZ.WorkFlow {

[Table("ElsaWorkFlowHistoryDetails")]
public class ElsaWorkFlowHistoryDetails : FullAuditedEntity, IMustHaveTenant
{
    [Column("ElsaWorkFlowHistoryDetailsId")]
    [Key]
    public override int Id { get; set; }

...

}

}


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @olmy90

    Maybe an odd question but did you add the entity to your DbContext ?