Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Issue with the new ProductService/OrderService etc. structure.

Issue with the new ProductService/OrderService etc. structure.

Simon Nordahl
Simon Nordahl
Reply

Hi all,

We do often write our own more complex SQL to fetch products/orders/users.

Until the newer versions (9.4) we have been able to parse a datareader to the constructor and thus building the object like so:

while (reader.Read())
{
    result.Add(new Order(reader));
}

However in the new structure this is no longer possible as the methods to build the objects from a datareader are now internal.

Are there any reason these methods are internal? Do we have any alternatives?

Dynamicweb.Ecommerce.Orders.OrderService -- > internal Order ExtractOrder(IDataReader reader)
Internal class Dynamicweb.Ecommerce.Products.ProductRepository --> Product ExtractProduct(IDataReader dataReader); 

Am I missing something? It would be nice to be able to build all the usual objects (User, Product, Order, Orderline, etc)  from a datareader.

As it is now, we have a lot of customers that we can not upgrade.

 

Regards

Simon Nordahl

 


Replies

 
Nicolai Pedersen
Reply

You do not.

It is a breaking change that should not be there.

I've send it to be fixed.

 
Olga Shedko Dynamicweb Employee
Olga Shedko
Reply

Hello Simon,

Related TFS # 50208 was fixed and will be available in the next release.

Thank you.

Best regards,

Olga | QA

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Simon

The problem regarding #50208 "Constructors missing from Order.vb and OrderLine.vb after movement to service/repository" has now been resolved in Dynamicweb version 9.4.12

To upgrade please choose this version from backend or download from here:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum