Software used-> Sitecore Commerce version 9.2, VS2019
We are using Unchase OData Connection service to generate/update service proxy in VS2019. Official OData provider for VS2017 (OData v4 Client Code Generator) are not supported in VS2019. Any alternate odata proxy generation tool/extension would also help.
The below code snippet is used to pull favorite items from commerce engine using ServiceProxy.
public FavoriteModel AddFavorite(FavoriteArgumentModel favArg)
{
FavoriteModel res = new FavoriteModel();
var container = EngineConnectUtility.GetShopsContainer();
var actionQuery = container.AddFavorite(favArg.UserId, favArg.ProductId, favArg.VariantId);
var commerceCommand = Proxy.DoCommand<AddFavoriteCommand>(actionQuery);
return res;
}
The issue is AddFavorite method is not called at runtime using proxyservice.
"Method not found: 'Microsoft.OData.Client.DataServiceActionQuerySingle`1 Sitecore.Commerce.Engine.Container.AddFavorite(System.String, System.String, System.String)'." exception is thrown by ServiceProxy
Any help would really help to move forward. Thank you.