Partial Methods and Hooks

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
First off, thank you for this package.  I'm new to nopCommerce and I'm impressed with the coding on this.  I have one concern in making modifications and then dealing later with upgrades.  I think anyway that I can keep my modified code separate from the original package, the better.  You have most of your classes set as partials, which is good.  One thing that would make it better is by adding partial methods and hooks.

For example, on the CustomerMap object you could have this

public partial class CustomerMap : NopEntityTypeConfiguration<Customer>
{
partial void CtorBefore();
partial void CtorAfter();
public Customer() {
   CtorBefore();
   ...
   CtorAfter();
}
...
8 years ago
curelom wrote:
First off, thank you for this package.  I'm new to nopCommerce and I'm impressed with the coding on this.  I have one concern in making modifications and then dealing later with upgrades.  I think anyway that I can keep my modified code separate from the original package, the better.  You have most of your classes set as partials, which is good.  One thing that would make it better is by adding partial methods and hooks.

For example, on the CustomerMap object you could have this

public partial class CustomerMap : NopEntityTypeConfiguration<Customer>
{
partial void CtorBefore();
partial void CtorAfter();
public Customer() {
   CtorBefore();
   ...
   CtorAfter();
}
...

You can see this post. it will be helpful for you
https://www.nopcommerce.com/boards/t/26817/a-nopcommerce-architecture-question-when-doing-customization.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.