nopCommerce 4.30 BETA released. Please share your impressions

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 года назад
Ok with SSl Unchecked and Use default credentials unchecked , port 587 works. I would like to get it to work with SSL. If any one has info and what to do please let me know. For now i can move to 4.30. Thanks
3 года назад
I am new to creating a plugin. I see this article that shows how to access data using nopcommerce versions 4.2 and below. I see IDbContext is used, but I don't see IDbContext in nopcommerce 4.3. Does anyone have any example of how to do this with version 4.3?
Thanks!!

public class ProductViewTrackerRecordObjectContext : DbContext, IDbContext


https://docs.nopcommerce.com/en/developer/plugins/plugin-with-data-access.html
3 года назад
hi primico,

you need a Builder Class for your new data entity, and a SchemaMigration class with 'Up()' method to create table in the db schema (code first)

Have a look at the FixedByWeightByTotal plugin source code as a reference point to see how it hangs together

Best regards
Jon


primico wrote:
I am new to creating a plugin. I see this article that shows how to access data using nopcommerce versions 4.2 and below. I see IDbContext is used, but I don't see IDbContext in nopcommerce 4.3. Does anyone have any example of how to do this with version 4.3?
Thanks!!

public class ProductViewTrackerRecordObjectContext : DbContext, IDbContext


https://docs.nopcommerce.com/en/developer/plugins/plugin-with-data-access.html
3 года назад
Thanks for the info... looking at some older plugin examples compared to new plugins with 4.3, I notice there are navigation properties that are no longer existing.. for example, customer used to have billing and shipping address, but these are gone now, correct?  Just want to make sure I'm not missing anything.

        public virtual Address BillingAddress { get; set; }
        public virtual Address ShippingAddress { get; set; }
3 года назад
Correct, navigation properties are gone with the move from MS entity framework to Linq2db in v4.3


primico wrote:
Thanks for the info... looking at some older plugin examples compared to new plugins with 4.3, I notice there are navigation properties that are no longer existing.. for example, customer used to have billing and shipping address, but these are gone now, correct?  Just want to make sure I'm not missing anything.

        public virtual Address BillingAddress { get; set; }
        public virtual Address ShippingAddress { get; set; }
3 года назад
JonQuick wrote:
hi primico,

you need a Builder Class for your new data entity, and a SchemaMigration class with 'Up()' method to create table in the db schema (code first)

Have a look at the FixedByWeightByTotal plugin source code as a reference point to see how it hangs together

Best regards
Jon


I am new to creating a plugin. I see this article that shows how to access data using nopcommerce versions 4.2 and below. I see IDbContext is used, but I don't see IDbContext in nopcommerce 4.3. Does anyone have any example of how to do this with version 4.3?
Thanks!!

public class ProductViewTrackerRecordObjectContext : DbContext, IDbContext


https://docs.nopcommerce.com/en/developer/plugins/plugin-with-data-access.html


What about old custom tables. Do you manually create the SchemaMigration file, and make it match the db?
3 года назад
If you want the Plugin to create the tables when the Plugin installs then you need to create the SchemaMigration. The record builder defines the fields in the db.

As noted above look at the existing pluigns
3 года назад
Yidna wrote:
If you want the Plugin to create the tables when the Plugin installs then you need to create the SchemaMigration. The record builder defines the fields in the db.

As noted above look at the existing pluigns


But what if i want to reverse it? I would like to be able to update the table later, but i would like the file to be created as the table is at the moment. I cannot create the table since its there with a lot of data. Im used to using code first migrations and if there is a mismatch with updates\migrations its hell.
3 года назад
If you have SSMS you can Generate a script to export the data from the table then run the script later on the newly created table
3 года назад
Yidna wrote:
If you have SSMS you can Generate a script to export the data from the table then run the script later on the newly created table


So the preferred way is to actually remove the custom tables and create it with scheme, then add the old data?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.