Jump to content

Photo

Create New Table using EF

EF

  • Please log in to reply
2 replies to this topic

#1 tkchung23

tkchung23

    Member

  • Members
  • PipPip
  • 16 posts

Posted 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

Attached Files



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3823 posts

Posted 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
  • PipPip
  • 16 posts

Posted 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!!!!




Also tagged with one or more of these keywords: EF