Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. EF Code first

    Go to project BeYourMarket.Model, find the entity that you would like to add a property. e.g. Category.cs. Then add the property to the model and update the corresponding mapping class CategoryMap.cs in the Mapping folder. Finally, update the database with migrations.

    For more info on EF code first, please visit Code First to a New Database.

  2. Database first

    It's a easier way but require Entity Framework Power Tools in Visual Studio. Go  Open Sql Management Studio, add new column to the database. Add the property to the table. In the visual studioThen in the Visual Studio, right click on the project BeYourMarket.Model, choose Entity Framework->Reverse Engineer Code First. It would then update the model accordingly.