Extend Customer Model

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

I need to extend customer model so it has a relation 1 -> N   with a new model ( people ). So I also create in backoffice a section where the customer service can read and manage this data and a extend the profile view area with a new tab where the customer can enter the information.
Could you have some examples?
Thanx
8 years ago
You don't show what you have with the People, so i'm not sure if you need to extend it this way.

Anyway, there're some 1-N relationship in Nop like BlogPost - BlogComment.


In order to make it work you have to understand the Entity Framework, there's tons of examples on google

here is one http://www.entityframeworktutorial.net/code-first/configure-one-to-many-relationship-in-code-first.aspx

Look for these and follow the example code in blog module:

1. Domains/blogs to define the entity

2. Nop.data/Mappings/blogs to configure the relationship of the entity

3. Nop.Services/blogs make sure to register your new service in Nop.Web.Framework/DependencyRegistrar.cs in order for the system to inject the right concrete class service when you make a call the service in Presentation layer.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.