Inhalte aufrufen

Profilbild

Create New Table using EF

EF

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
2 Antworten zu diesem Thema

#1 tkchung23

tkchung23

    Member

  • Members
  • PunktPunkt
  • 16 Beiträge

Geschrieben: 14 March 2019 - 16:54

Hi all, 

 

I am trying to add extra fields in the Order table and create a new table with some fields in the database. For adding fields, I modified the Order.cs in Core is no problem, however, it doesn't work for creating a new table which I create new .cs file under domain folder and inherit to BaseEntity and execute below PM script:

  1. add-migration xxxx

  2. update-databse

 

There just have the Order update but doesn't work with new table action.

Can anyone help?

Thanks.

 

Regards,

Eric

Angehängte Bilder



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3831 Beiträge

Geschrieben: 14 March 2019 - 18:47

Does a CreateTable statement for creating the table appear in the migration script created in this way?
Didn't you forget the EntityTypeConfiguration?

Marcus Gesing

Smartstore AG


#3 tkchung23

tkchung23

    Member

  • Members
  • PunktPunkt
  • 16 Beiträge

Geschrieben: 16 March 2019 - 07:16

 

Does a CreateTable statement for creating the table appear in the migration script created in this way?
Didn't you forget the EntityTypeConfiguration?

 

 

Yes, thanks for your help!!!!




Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: EF