wunpac wrote:Can anyone help me on this?
Could it be to do with EF not tracking changes?
I'm not entirely sure about the structure of your WPF/external application. But...
Yes, it's about EF. Your application and nopCommerce Web will not use the same data, if you change something, Web will not see or be notified about the changes. If Web changes something, your app will not detect the changes since you are running a separate "EF instance", with its own caches and so on.
That is one of the reasons behind using the WebServices plugin. You have to use the same EF instance as Web and route all calls and data manipulation through Web. EF caches and lazy loads data from the DB so your external app will not use the same data as the Web application.
You have to extend (or write another) WebServices plugin containing the methods you need and communicate with the Web application using those services, otherwise the two applications will never use the same data. With synchronization problems, data corruption, as a result.
[As a side note, we are building a somewhat large new system (webshop) based on nopCommerce (180,000 orders/year, 30 million euro in revenue). We have an in-house, specialized solution today but are going with nopCommerce for the next step, generation. Our customizations (project span) is planned to about 6,000 hrs including testing and all things.
Architecturally, what we are going to do. Is to let nopCommerce to manage the shop. We have a lot of customizations we will have to do but the main thing is to let the nopCommerce engine to "its thing". We will not build the ERP functionality into nopCommerce since it would require almost a complete departure from the main thread of development and we will stay as compatible as possible with future updates. So we handle this through batch jobs and a customized webservice plugin. Most of "our" business logic reside in the batch jobs. They lift orders from nopCommerce into our ERP system and also updates data the other way around. For critical operations (as stock or article information) we have direct connections, still going through services but using BizTalk instead of batch jobs.]