I am looking at this code and I wanted to ask what the ServiceStack equivalent of the FromServicesAttribute
is. If there is none, any tips on how to change that sample to work with ServiceStack services correctly?
I have no idea what [FromServices]
is/does. Looks like it’s just for injecting IOC dependencies into your actions:
If you want to retrieve a dependency in your Services impl (i.e. that you don’t want injected in your Service) you can retrieve it using:
var dep = Request.TryResolve<IMyDep>(); // from RequestServices
var dep = TryResolve<IMyDep>(); // from ApplicationServices
1 Like
FromServices looks to be some MVC thing.
Resolve works - thanks for that!
1 Like