errorin nop commerce documentation

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anos atrás
we are trying the Plugin with data access. Here when we create the builder class ProductViewTrackerRecordBuilder and getting the following error when using the example code in the documentation.

PLEASE ASSIST.

Error  CS0308  The non-generic method 'IColumnOptionSyntax<ICreateTableColumnOptionOrWithColumnSyntax, ICreateTableColumnOptionOrForeignKeyCascadeOrWithColumnSyntax>.ForeignKey(string, string)' cannot be used with type arguments  Nop.Plugin.Appfinity.MyFirstPlugin
3 anos atrás
What version of nopCommerce are you using ?
What is the link to the documentation page are you looking at ?
3 anos atrás
HI,
Im using the latest 4.3
Documentation
https://docs.nopcommerce.com/en/developer/plugins/plugin-with-data-access.html
3 anos atrás
I can’t see anything about those methods you are trying to use on the documentation page
Here is another thread that has some info and links to Fluent Migrator documentation
https://www.nopcommerce.com/en/boards/topic/81549/nopcommerce-43-beta-fluent-migrator-workflow
3 anos atrás
Hi @yidna,
The error is actually in the line where we define the foreign key
ForeignKey<Product>(onDelete: Rule.Cascade)

Is this working for you? Visual studio intellisense is not showing such an extension method available. I dont kow if this is because of any reference not added.
3 anos atrás
No I dont use it
There is similar in src43\Libraries\Nop.Data\Mapping\Builders\Orders\OrderBuilder.cs
.WithColumn(nameof(Order.BillingAddressId)).AsInt32().ForeignKey<Address>(onDelete: Rule.None)
There are some notes on Google saying it is not supported but ...?
https://stackoverflow.com/questions/45565700/is-it-possible-to-add-a-cascading-delete-to-an-existing-relationship-using-fluen
Search Google for "Fluent Migrator ForeignKey<Product>(onDelete"
3 anos atrás
This error only pops up after I add using FluentMigrator.Builders.Create.Table;
and why does it only cause issue with
.WithColumn(nameof(ProductViewTrackerRecord.ProductId)).AsInt32().ForeignKey<Product>(onDelete: Rule.Cascade)

but not
.WithColumn(nameof(ProductViewTrackerRecord.CustomerId)).AsInt32().ForeignKey<Customer>(onDelete: Rule.Cascade)
3 anos atrás
Please refer this link
https://www.nopcommerce.com/en/boards/topic/87735/nopcommerce-43-linq2db-foreign-key
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.