Developer forum

Forum » Development » Migration issues from 9.3 to 9.4 regarding changed API's

Migration issues from 9.3 to 9.4 regarding changed API's

Antek Drzewiecki
Reply

Hello,

We are currently migrating a project from 9.3 to 9.4 and we are fixing all deprecation warnings. I notice there are quite some API changes and it is not always clear how to migrate without changing the behaviour of the method.

For example the Product -> ProductService migration regarding the GetProductById method.
Product has 4 overloads for the method as described:
GetProductById(String) 
GetProductById(String, String)
GetProductById(String, String, Boolean)
GetProductById(String, String, String) Obsolete.
GetProductById(String, String, String, Boolean)

The ProductService has 2 overloads and a slightly different API.
GetProductById(String, String, Boolean)
GetProductById(String, String, String)
GetProductById(String, String, String, Boolean)

For example if I am migrating my Product.GetProductById(String) method. What is the best way to migrate without breaking existing functionality? Because the default parameters are not quite clear in the documentation. What is the best way for this approach for other methods and services I am having the same issue with?

Best regards,

Antek Drzewiecki


Replies

 
Antek Drzewiecki
Reply

I'm trying to upgrade the method.Order.GetOrders(string query).
The closest method I found was OrderService.FindOrders(....). But this order does not allows me to cast to a spesific field.

So what is the best way to get orders with a specific where statement, without having to use Database Readers and having to cast that to Orders with custom written methods?
What I want to do is to create a query Select * from EcomOrders where somefield = somevalue, preferably with custom And or OR statements..

 
Nicolai Pedersen
Reply

Hi Antek

You can still use it - there is no equivalent on the orderservice yet - it was obsoleted because there was no internal use of the method left in Dynamicweb. There is still a version that is not obsoleted on OrderCollection.Load(sql) that can be used. But that will also get obsoleted probably with 9.5.

BR Nicolai

 

You must be logged in to post in the forum