Hi,
I want to simply the design for some of my controllers and use the Repository directly from controller.
Is there an example snippet anyone can provide?
Many thanks in advance.
Best Regards, Vikas
7 Answer(s)
-
0
Inject it, like anywhere else.
https://aspnetboilerplate.com/Pages/Documents/Dependency-Injection
-
0
Thanks @aaron.
I was able to make it work.
Does the Application Service expose the services as API? Coding directly in contoller would mean no api for that operation?
Regads, Vikas
-
0
What do you mean no API?
-
0
@aaron: What I mean is that any methods that as written as ApplicationService in Projectname.Application project seems to be available as an API.
If any database operation methods are written elsewhere, they won't be availabe as API?
Just want to verify my understanding.
-
0
Application Service and Controller methods expose HTTP API, if that's what you mean.
-
0
Thank you.
-
0
Closing ticket