The problem is, the constructor takes to params, and I haven't found out how to create an OrderRepository.
Can anyone help me out here?
Thanks in advance. Peter
FYI The constructor also needs some cacheservice, which I think I should instantiate like next code, but as you can see, I'm having trouble with the IOrderRepository, and cannot find anything in the DLLs:
When adding the Autofac (https://code.google.com/p/autofac/wiki/GettingStarted#Add_Autofac_References) package, I was able to resolve the repository and do queries on the orders!
All the Autofac is hidden, AND if someone did a DependencySuppress of the OrderService then your code wouldn't use it. But the singleton way ensures you that you get the one that is registered and you dont have to think about Autofac and other advanced stuff :)
Not have an exact date for it - but we are working on it. Would you need some examples or just a normal .Net API reference document with all classes, namespaces and methods?
Well any basic API reference would be nice: Most methods like this OrderService.Instance.Search are trivial for any custom software building, so any docs would be appreciated!
My conflicting REST service namespace OrderService obviously masked the one I needed... Which is resolved now by refactoring my namespaces and REST services.
How to instantiate OrderService
Hi all,
I'm trying to write code to get some orders.
I want to use the OrderService class like this:
The problem is, the constructor takes to params, and I haven't found out how to create an OrderRepository.
Can anyone help me out here?
Thanks in advance.
Peter
FYI
The constructor also needs some cacheservice, which I think I should instantiate like next code, but as you can see, I'm having trouble with the IOrderRepository, and cannot find anything in the DLLs:
Solved it myself:
When adding the Autofac (https://code.google.com/p/autofac/wiki/GettingStarted#Add_Autofac_References) package, I was able to resolve the repository and do queries on the orders!
Hi Peter
The simple way is:
OrderService.Instance.TheMethodYouWantToInvoke()
All the Autofac is hidden, AND if someone did a DependencySuppress of the OrderService then your code wouldn't use it. But the singleton way ensures you that you get the one that is registered and you dont have to think about Autofac and other advanced stuff :)
Kind regards
Anders
Ah ok thanks, my namespaces conflicted I think, that is why I couldn't normally find the OrderService...
Any idea on when the .Net documentation will be online?
Ahh that might be the problem :)
Not have an exact date for it - but we are working on it. Would you need some examples or just a normal .Net API reference document with all classes, namespaces and methods?
Kind regards
Anders
Well any basic API reference would be nice:
Most methods like this OrderService.Instance.Search are trivial for any custom software building, so any docs would be appreciated!
My conflicting REST service namespace OrderService obviously masked the one I needed...
Which is resolved now by refactoring my namespaces and REST services.
Kind regards,
Peter Rombouts
is working on a reply...