adding custom entity 4.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
Hi,

The developerdoc only shows adding custom property. I am wondering what is the best way in version 4.0 to add some custom entities.

1. Add a new folder Building
2. Add a custom class in Nop.Core.Domain.Building  building.cs where i put in the file properties
3. Add a mapping file in [Project Root]\Libraries\Nop.Data\Mapping\Building  buildingmap.cs

do the samething for the presentation layer.

Do i have to create my own SQL Files?
Do i have to update the emx file


Any thoughts, guides are welcome :-).


Beste regards marce
6 years ago
mpevreuls wrote:
Hi,

The developerdoc only shows adding custom property. I am wondering what is the best way in version 4.0 to add some custom entities.

1. Add a new folder Building
2. Add a custom class in Nop.Core.Domain.Building  building.cs where i put in the file properties
3. Add a mapping file in [Project Root]\Libraries\Nop.Data\Mapping\Building  buildingmap.cs

do the samething for the presentation layer.

Do i have to create my own SQL Files?
Do i have to update the emx file


Any thoughts, guides are welcome :-).


Beste regards marce


do the samething for the presentation layer.==> Use it from presentation layer i.e insert data ..view data .register service.. ..Write service and register it.

Do i have to create my own SQL Files? ==> Have to do creaate table manually if you alrady have DB. If you don't have DB. You can install nopcommerce DB will generate automatic with your table too

Do i have to update the emx file ==> No.

//Sohel
6 years ago
Thanks Sohel!! I will work with that.
After reading so more what do you advice. Should i put it all in a seperate plugin or just add it to the Nop.Core places. if i put it in custom plugin i do not need to add the files in the .Core.Domain do i?



Thanks for you time :-)..
6 years ago
mpevreuls wrote:
Thanks Sohel!! I will work with that.
After reading so more what do you advice. Should i put it all in a seperate plugin or just add it to the Nop.Core places. if i put it in custom plugin i do not need to add the files in the .Core.Domain do i?



Thanks for you time :-)..



Try understand Extend nopcommerce

2 way:

1: Extend nopcommerce by customize source

2: By plugin

Note: Plugin used for different purpose too. I.e payment, Shipping, Slider so on...

Should i put it all in a seperate plugin or just add it to the Nop.Core places. ==>Depend on You.

Customize core code easy way.. but should keep track your changes.  it will useful for version upgrade.

Note:Most of the case plugin is recommended. But depend on uses purpose

// Sohel
5 years ago
nopStation wrote:

do the samething for the presentation layer.==> Use it from presentation layer i.e insert data ..view data .register service.. ..Write service and register it.


Hi, I'm also interested in this topic. Could you please elaborate a little bit on how to write a service and get it registered?

Or if you can show me the NopCommerce documentation, that would be much appreciated!

Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.