Hi guys,
In a search function I use the GetProductByNumber method.
It works fine, but we now, after many import cycles, have an issue ...
We have multiple product records with the same product number, but only 1 per language which is active.
The GetProductByNumber retuns the first one it encounters, which is an inactive one ....
Shouldn't it return an active product? Or at least give me the option to configure this with an overload?
We don't remove old products but make them inactive for they can be attached to orders.
Do I really have to use GetAllActiveProducts.FirstOrDefault(p => p.ProductNumber == myNumber)?
Sounds like a lot of overhead ...