Access Country/State lists from NopCommerce plugin

349 views Asked by At

Does Nop give you the ability to populate dropdown lists with country/state info? I realize that I could query the tables dbo.Country and dbo.StateProvince but was hoping for an easier solution

1

There are 1 answers

0
Jeyara On BEST ANSWER

You dont need to write your own code to read tables. It is already available as service. Just pass ICountryService and IStateProvinceService Interfaces into the constructor of your plugin's controller. AutoFac will take care of instantiating. those.

ICountryService gives all the CRUD Methods for Country table. IStateProvinceService gives all the CURD Methods for StateProvice table.