How to access current database with easy way in plugin?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 年 前
Hello everyone.I want to acces current database(database that was created while nopcommerce instalatio n) in my plugin's controller.Is there an easy way to do this.For example Datacontext db =new Datacontext(); or something like this?
5 年 前
Hello,

There are lots of way to access it.

But best is to follow nopcommerce structure.

You have to create service for that and this service you must register at dependency register file of your plugin.

That's way you have to access db.

Hope you will understand..!!
5 年 前
what u mean at service ?
5 年 前
what is the service for current database,that i should register?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.