Add a new data property

In most cases, you could extend the functionalities with Plugins in BeYourMarket. However, in certain scenario, you might want to modify the core functionalities and extend the pre-defined data model by adding a column or table in the database. There are 2 ways to do that.

To add a new property on an existing model

  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. Open Sql Management Studio, add new column to the table. Then 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.