To add a domain model in nopcommerce, follow these steps:
1. Create an entity class (NOP/CORE/domain/entity. CS)
2. Create a mapping class (NOP/data/mapping/entitymap. CS)
3. Create a view model (NOP/admin/models/entitymodel. CS or NOP/web/models/entitymodel. CS)
4. Create model validator (NOP/admin/validators/entityvalidator. CS or NOP/web/validators/entityvalidator. CS)
5. Create a ing configuration for automapper to complete the conversion between the model and entity (NOP/admin/infrastructure/automapperstartuptask. CS or NOP/web/infrastructure/automapperstartuptask. CS)
6. Write tomodel and toentity (NOP/admin/mappingextensions. CS or NOP/web/mappingextensions. CS)
7. Create service and service interface (NOP/services/entityservice. CS and NOP/services/ientityservice. CS)
8. Create the controller and view for the newly created model.
PS: nopcommerce does not support database migration. You need to update the database manually.
References: http://www.nopcommerce.com/docs/73/updating-an-existing-entity-how-to-add-a-new-property.aspx
Reprinted: http://www.cnblogs.com/aneasystone/archive/2012/08/27/2659183.html
To add a domain model in nopcommerce, follow these steps:
1. Create an entity class (NOP/CORE/domain/entity. CS)
2. Create a mapping class (NOP/data/mapping/entitymap. CS)
3. Create a view model (NOP/admin/models/entitymodel. CS or NOP/web/models/entitymodel. CS)
4. Create model validator (NOP/admin/validators/entityvalidator. CS or NOP/web/validators/entityvalidator. CS)
5. Create a ing configuration for automapper to complete the conversion between the model and entity (NOP/admin/infrastructure/automapperstartuptask. CS or NOP/web/infrastructure/automapperstartuptask. CS)
6. Write tomodel and toentity (NOP/admin/mappingextensions. CS or NOP/web/mappingextensions. CS)
7. Create service and service interface (NOP/services/entityservice. CS and NOP/services/ientityservice. CS)
8. Create the controller and view for the newly created model.
PS: nopcommerce does not support database migration. You need to update the database manually.
References: http://www.nopcommerce.com/docs/73/updating-an-existing-entity-how-to-add-a-new-property.aspx
Reprinted: http://www.cnblogs.com/aneasystone/archive/2012/08/27/2659183.html